-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Use case
Text navigation using numpad keys is something expected on Linux and Windows. See #144936.
Numpad keys navigation behavior depends on the numLock key state.
For instance, consider numpad4 (left arrow navigation):
Case 1 - When numLock is locked, pressing numpad4 alone is not a navigation shortcut (in a text field, it should print ‘4’).
Case 2 - When numLock is locked, pressing shift and numpad4 is a navigation shortcut.
Case 3 - When numLock is unlocked, pressing numpad4 alone is a navigation shortcut.
Case 4 - When numLock is unlocked, pressing shift and numpad4 is not a navigation shortcut.
It is currently possible to define a shortcut that will be triggered only for case 2 (using LogicalKeySet):
LogicalKeySet(LogicalKeyboardKey.shiftLeft, LogicalKeyboardKey.numLock, LogicalKeyboardKey.numpad4): const ExtendSelectionByCharacterIntent(forward: false, collapseSelection: false),AFAIK, it is currently not possible to define a shortcut that will be triggered only for case 3.
Defining a SingleActivator such as:
const SingleActivator(LogicalKeyboardKey.numpad4)Will trigger the shortcut for case 3, but it will also trigger the shortcut for case 1.
Proposal
Proposal Add a way to specify that a shortcut will be triggered only if numLock is unlocked.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status