Allow for multi-stroke keyboard shortcuts ( accumulated )
-
@vectoradmin said in Allow for multi-stroke keyboard shortcuts:
Just need a good UI for it: how to input multi-stroke shortcuts.
As a non-developer, can you elaborate more on what you mean by this?
-
@Boldline Well, in the current "customize shortcuts" view, when pressing a key combination in the action list, that can be recorded as a shortcut.
Pressing an other one, overwrites the previous.
So how to add multiple key presses?
-
Put another way: the program itself can already accept and interpret multi-stroke shortcuts once such a shortcut has assigned to something, but currently there is no way to assign one to anything.
-
@vectoradmin Could this be done by designating a recording input session with a button to start and stop - similar to the way an action is recorded?
-
@Boldline How about this?
- user clicks on an existing shortcut: editing opens
- pressing the shortcut replaces the existing shortcut.
- pressing another shortcut adds to the edited shortcut.
- to replace the shortcut again, the user must press [delete] or click away and click again.
-
@vectoradmin said in Allow for multi-stroke keyboard shortcuts:
@Boldline How about this?
- user clicks on an existing shortcut: editing opens
- pressing the shortcut replaces the existing shortcut.
- pressing another shortcut adds to the edited shortcut.
- to replace the shortcut again, the user must press [delete] or click away and click again.
Not really a problem, but maybe to help highlight that there is some hidden complexity in this request:
How do you cover the case where the user has already set, say Control+K B as a shortcut, then wants to add one for Control+K E?
In this case, when the user enters Control+K to start the shortcut, you have an immediate conflict between a single-stroke shortcut (Control+K) and a dual-stroke shortcut (Control+K B), so if the user leaves it that way, which one wins?
Or going the other way, if there is already a Control+K shortcut and the user creates one for Control+K B?
-
@fde101 said in Allow for multi-stroke keyboard shortcuts:
How do you cover the case where the user has already set, say Control+K B as a shortcut, then wants to add one for Control+K E?
Cannot. The user has to restart. Or there can be some kind of highlight, that can be cleared to avoid deleting the existing shortcut?
-
@vectoradmin I mean for two different commands. If one command is set as Control+K B, then how do you set another command to Control+K E without creating a conflict before the E is added to the command?
One option for example is that if you use the first stroke of the existing shortcut the interface does not actually set the new one until the second key is provided...
-
@vectoradmin I suggest to do this the way it works in JetBrains's IDEs:
They provide a checkbox "Second stroke". If you check it a second text field appears or gets un-greyed-out, in which you can then type your second stroke.
-
@fde101 said in Allow for multi-stroke keyboard shortcuts:
@vectoradmin I mean for two different commands. If one command is set as Control+K B, then how do you set another command to Control+K E without creating a conflict before the E is added to the command?
@fde101 As long as the keys are assigned (somehow), the shortcut handler is able to figure this out. But: in that case there cannot be a shortcut with only "Control+K"
-
@fde101 See my comment to @vectoradmin, where I described how JetBrains perfectly solved this issue.