Comments (18)
I submitted, I kept the previous copy in Alt+Shift+Z, those shortcuts will be configurable via settings screen soon.
Here is the list of current settings
Copy Rich Text:
- Windows: Alt+Shift+C
- Mac: Ctrl+Shift+C
Copy Markdown:
- Windows: Alt+Shift+D
- Mac: Ctrl+Shift+D
Copy Title - URL:
- Windows: Alt+Shift+X
- Mac: Ctrl+Shift+X
Repeat previous copy format:
- Windows: Alt+Shift+Z
- Mac: Ctrl+Shift+Z
from quickcopytitleandurl.
Chrome supports "activating" extension using: chrome://extensions/shortcuts
(found via the hamburger menu in the upper left of the Extensions page chrome://extensions
)
Then I guess when the popup window is active, you can try to capture keyboard shortcuts using javascript in the extensions popup page.
This post is a bit of overkill but does hotkey handling:
https://medium.com/better-programming/full-featured-hotkeys-library-in-200-lines-of-javascript-code-81a74e3138cc
from quickcopytitleandurl.
Thank you for your feedback, I'll look into those hotkeys features!
from quickcopytitleandurl.
It seems they already have out-of-box API here, and those shortcut keys are available
chrome.commands - Google Chrome
from quickcopytitleandurl.
I got hot-key working, Command+Shift+C is bringing debug console so I'm thinking using Command+Shift+P. I also figured I needed reload chrome extension for testing, some voodoo reloading stuff. It's impossible to popup menu programmatically without user interaction. This make sense, all playing sound API, etc... requires the user to click on the screen first. Only the way is to popup modal window or new tab, which defeats the purpose of this plugin to copy Title.
One solution is using Notification as if it's like Toastr message, but it could be annoying if it's not transparent. Instead, I'm thinking "Remember the last selection" and Ctrl+Shift+P to repeat the previous action.
from quickcopytitleandurl.
A few updates on this PR #14
First of all, Chrome doesn't allow popup something without user interaction using mouse. This is common security feature and I saw similar behavior for auto-playing sound and so on. So I decided to implement HotKey / Shortcuts based on previous selection. This should serve most of use case. For example, you are editing Markdown, you might be keep adding links in Markdown format.
Current candidates for shortcuts:
Windows: Alt+Shift+C
Mac: Ctrl+Shift+C (Alt key is not translated in Mac? Option Key didn't load somehow)
from quickcopytitleandurl.
Ok here is the updated shortcut key features in v1.5.0
Quick Copy (Use previously selected format)
- Windows: Alt+Shift+C (Single Tab) / Alt+Shift+A (All Tabs)
- Mac: Ctrl+Shift+C (Single Tab) / Ctrl+Shift+A (All Tabs)
from quickcopytitleandurl.
awsome! I'm looking forward to trying it out!
from quickcopytitleandurl.
Ohh, I just read your notes about "using the last selection" for the hotkey... I can't speak for other users, but this mystery-context-sensitivty is not going to work for me.
I'm about 60% Rich Text, 39% Markdown, 1% others. And I most frequently only grab one link per compose session. (80% of sessions are only 1 link) I'm not going to remember "which format I used last", so because of this "use last model" I'm still always going to have to use the menu.
I would prefer other models, like:
- hit the hotkey multiple times in a row to cycle through the types... but in a fixed order.. (i.e. hit hotkey 4 times to get rich text)
- ...or let me re-order the menu so I can put Rich Text first, and Markdown Second.
- let me choose one type to hotkey (I would do Rich Text)
- let me click to open the menu and then use numbers to just speed up picking the type... so I would click on the addon to open the popup, then hit "4"... which would be much faster
from quickcopytitleandurl.
@jeske
I hear you, I'm going to implement settings soon. I can reserve max 4 shortcuts and I'll make them customizable.
For now, how about those 4 keys
- Alt+Shift+C (Default: Repeat Previous Format)
- Alt+Shift+A (Default: Repeat Previous Format for All Tabs) ... probably I'll drop this.. When we use "Copy All Tabs" probably we should do this from dropdown menu.
- Alt+Shift+R (Default: Rich Text)
- Alt+Shift+M (Default: Markdown)
Let me add Rich Text and Markdown today, I'm updating one more version for the context menu, and this should help you for quick solution before working on the setting screen. I think it's better than cycle since you can hit in one-stroke (Alt+Shift+R or Alt+Shift+M). I also agree that I often use those 2 items.
Yeah, I was thinking re-order menu items too, I added it in my todo list. Feature Requests
I'll research about capturing key while popup is open. I'm expecting Chrome Extension can do same key event handling like regular browser window.
from quickcopytitleandurl.
Btw, I just put those shortcuts and in this early stage, I don't mind changing those default shortcut keys (I don't think other users will complain either). Does Alt+Shift+M is bad choice for you since I am forcing you to use both hands?
- Alt+Shift - left hand
- M - right hand
It's easy to remember, and my workflow is usually copy into chat tools after Alt+Tab then past it.
from quickcopytitleandurl.
ALT-SHIFT-R shortcut seems good.
No, I don't think I'd use two handed shortcuts like alt-shift-M. My most common use of this is with gmail (or github). Typically I go into another browser window, either to find an existing tab, or search the web for a page I already knew about, mouse-copycat to grab link, mouse-click directly back into the composer insertion point (I'm usually on a desktop dual monitor setup with lots of space for windows), then control-V to paste.
Here are some more thoughts on this topic...
I would remove the "repeat last" concept entirely. The problem is, the last time a user used copycat could be hours or even days ago. How would they remember and know what repeat-last is even going to do? Repeat-last is more something used to repeat something complex a bunch of times quickly, like in emacs, where I record a weird complex sequence of editing actions, and then spam repeat-last 15 times to do the same thing on a bunch of successive lines. In this case i's more like "repeat the thing I did in the last ~30 seconds, otherwise do nothing".
I would drop the all-tabs shortcuts, and certainly not make them default, because this doesn't seem like a common use case. I've never used the feature at all, even from the menu. Is this something you use?
If it was me, I would setup 2-3 shortcuts for the most commonly used options, and defer anything else for when there is a settings page. Something like:
- alt-shift-C (rich text)
- alt-shift-D (markdown)
- alt-shift-X (Title - URL) (maybe?)
from quickcopytitleandurl.
ok make sense, let me put those 4 keys and I'll set default actions.
from quickcopytitleandurl.
sounds great!
from quickcopytitleandurl.
OK it's published. Please try now.
from quickcopytitleandurl.
unfortunately, the shortcuts are not working for me in the new version on windows 10. I'll load it unpacked and see if I can figure out what's going on.
from quickcopytitleandurl.
I guess the alt-shift-C shortcut isn't available by default on windows?
I went into chrome://extensions/shortcuts and it was empty... However, after assigning it, there, it works great!
from quickcopytitleandurl.
As another note.... it has a shortcut called "Activate the Extension" which activates the popup. I wonder if this can be used to do the original idea, of having a shortcut to activate the extension, and then a number key for the type of the copy.
from quickcopytitleandurl.
Related Issues (15)
- copy HTML does not put page title in HTML HOT 6
- New Copy Format HOT 4
- Copy BBCode HOT 2
- Copy All Tabs - last tab skipped HOT 3
- automatically filter leading "(5)" page title prefixes appearing all over now HOT 3
- idea: Integrate with right-click menu HOT 3
- Bigger menu with icons HOT 4
- Font Size is too big in Version 1.5.0 HOT 13
- Not appearing in toolbar HOT 2
- allow keyboard selection
- copy multiple formats at once
- "Copy Rich Text Link" Does not work ๐ฅ HOT 3
- Option - Copy Text with link only - no formatting
- Asciidoc links and image links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickcopytitleandurl.