Usefulness of second keystroke
Answered
What is the benefit of having a two-stroke shortcut key? As far as I've tried, if either of the two strokes conflicts with other key bindings then the behavior of the shortcut becomes undefined. For example, I defined a shortcut Ctrl+V, Ctrl+R. However, this broke the default behavior for paste action. Am I doing something wrong?
Please sign in to leave a comment.
Indeed, it will not work if the shortcut conflicts with some other action.
Then what is the use case for using a second stroke?
You can have more possible combinations if you are using double keystrokes that do not conflict with other single keystrokes.
What's the benefit of having more possible combinations if the number of combinations is limited by the number of possible combinations of single keystroke. I'm sorry, I am probably misunderstanding you here. Could you provide me an example where double keystroke is useful?
It's not limited, you can have multiple double keystroke shortcuts that have the same first keystroke (unless this first keystroke is used by some single keystroke shortcut).
I don't understand usefulness of that either.
I defined shortcut to select line at caret on second stroke of letter 'c'. However I cannot type letter 'c' in the editor at all - I get "prefix key pressed. Select line at caret (C)" message on the bottom toolbar.
Effectively it breaks behavior of any action assigned to first stroke so I don't see any benefit of that because if there was no behavior assigned to first stroke I would simply use single stroke to define my shortcut.
With that being said, I understand that it has to conflict with first stroke.
Serge was being nice. I dont understand why you don't see this. If CTRL + B isn't defined, you can now create:
CTRL + B, CTRL + A
CTRL + B, CTRL + B
CTRL + B, CTRL + C
CTRL + B, CTRL + D
etc...
The point is that people are running out of single-keystrokes (and some are more convenient), so now this expands your options. Single keystroke gives you ~24 options, double gives you ~24 X ~24
_
Indeed, I wish we could use sequences of three or four keystrokes. You can setup a keyboard layout that's easier to memorize at the expense of an extra keystroke. You can group related commands under a common prefix. Emacs does this a lot (though not always in a way that makes sense to me).
Ha...thanks Jmorris93. I was as confused as Raf.
So it's basically like a namespace for keyboard shortcuts. Interesting.
Sorry for reviving old thread found via Google, but I'm going to address this as yet unanswered conjecture:
By doing what you're suggesting—just using the single stroke and calling it a day—you're eliminating the possibility of the n additional shortcuts you could have bound as a second stroke. I.e., instead of just:
You can open up more space for more shortcuts by utilizing second strokes: