You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.
Currently a user is not warned if they are using keys not in the current keymap. It would be helpful if an error is logged to the console (if not thrown outright) if a commands keybinding is registered that uses keys not in the keyboard layout.
* Test whether the given key is a valid value for the layout.
*
* @param key - The user provided key to test for validity.
*
* @returns `true` if the key is valid, `false` otherwise.
*/
isValidKey(key: string): boolean;
We had this come up in jupyterlab/jupyterlab#6027, where the user used "Up" instead of "ArrowUp". It would have been useful if there was an error in the console about an unrecognized key.
The text was updated successfully, but these errors were encountered:
Currently a user is not warned if they are using keys not in the current keymap. It would be helpful if an error is logged to the console (if not thrown outright) if a commands keybinding is registered that uses keys not in the keyboard layout.
I think it might be enough to check in https://github.com/phosphorjs/phosphor/blob/master/packages/commands/src/index.ts#L1028, or perhaps in
phosphor/packages/commands/src/index.ts
Line 1178 in 8d99dbc
getKeyboardLayout().isValidKey()
function:phosphor/packages/keyboard/src/index.ts
Lines 33 to 40 in 8d99dbc
We had this come up in jupyterlab/jupyterlab#6027, where the user used "Up" instead of "ArrowUp". It would have been useful if there was an error in the console about an unrecognized key.
The text was updated successfully, but these errors were encountered: