-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Choose summon keybinding #1494
Choose summon keybinding #1494
Conversation
Socket Security Pull Request Report👍 No new dependency issues detected in pull request Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with Ignoring: Powered by socket.dev |
@SocketSecurity ignore core-js@3.29.1 |
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Just wanted to confirm that this (0.6.2-canary.2) allows selecting a working summon key on linux. The alt+- default previously did not work for me (nor does alt+- work now if choosen). Didnt investigate why alt+- didnt work. But thanks for fixing this! |
* Choose summon keybinding (#1494) Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com> * remove schema files, update test * add default shortcuts state * edit shortcut clarity (#1514) --------- Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com> Co-authored-by: Jordan Muir <jordan@frame.sh>
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
* Integrate pylon evm (#1478) * bump version * remove infura and alchemy presets, use pylon * update package lock * remove gnosis chain preset * fix chain name * move migrations to separate files, use TS (#1482) * add Zod validation of state chain objects, infer types (#1485) * add Zod validation of state chain objects, infer types * move state files to TS, add more inferred types * fix persist mock for tests * add types to main state * update test * add mute notification schema * move type export to state main * move legacy file to TS * try new migration format * update legacy migrations and tests * fix gas fees type * fix gas type * move legacy mapping * final migration prototype * finish migration poc * finish cleaning up migrations * test cleanup * fix compilation error * fix state parsing * Choose summon keybinding (#1494) Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com> * re-order migrations * convert hot signers to TS, make tests run reliably * more commits * update comment * remove unneeded assignment * make worker interaction more typesafe * remove unused code * remove unused interface * fix tests * revert weird test change * try revert file * try move * decouple worker controller and launch script, write controller tests * fix worker exit in tests * remove double cast * rename some files * remove ignore * clean up worker interface * last cleanup, fix typed data * more type safety * rebase, add bip39 type * remove ts-ignores * remove rebase artifact * remove migration files * update package lock --------- Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
* Integrate pylon evm (#1478) * bump version * remove infura and alchemy presets, use pylon * update package lock * remove gnosis chain preset * fix chain name * move migrations to separate files, use TS (#1482) * add Zod validation of state chain objects, infer types (#1485) * add Zod validation of state chain objects, infer types * move state files to TS, add more inferred types * fix persist mock for tests * add types to main state * update test * add mute notification schema * move type export to state main * move legacy file to TS * try new migration format * update legacy migrations and tests * fix gas fees type * fix gas type * move legacy mapping * final migration prototype * finish migration poc * finish cleaning up migrations * test cleanup * fix compilation error * fix state parsing * Choose summon keybinding (#1494) Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com> * re-order migrations * convert hot signers to TS, make tests run reliably * more commits * update comment * remove unneeded assignment * make worker interaction more typesafe * remove unused code * remove unused interface * fix tests * revert weird test change * try revert file * try move * decouple worker controller and launch script, write controller tests * fix worker exit in tests * remove double cast * rename some files * remove ignore * clean up worker interface * last cleanup, fix typed data * more type safety * rebase, add bip39 type * remove ts-ignores * remove rebase artifact * remove migration files * update package lock --------- Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Co-authored-by: goosewobbler <goosewobbler@pm.me> Co-authored-by: goosewobbler <goosewobbler@protonmail.com>
Allowing users to choose the summon keybinding. Key presses are detected and mapped to an accelerator which is registered using the globalShortcut API. We are still using the experimental keyboard API getLayoutMap to better represent shortcut keys to users with different keyboard layouts (though this does not work in all cases)
https://www.w3.org/TR/uievents-code/#code-value-tables
https://www.electronjs.org/docs/latest/api/accelerator
https://www.electronjs.org/docs/latest/api/global-shortcut
https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/getLayoutMap
https://tkainrad.dev/posts/why-keyboard-shortcuts-dont-work-on-non-us-keyboard-layouts-and-how-to-fix-it
Limitations
CTRL + ALT + D
works because multiple modifierKeys are allowed butCTRL + A + D
is not possible due to two shortcutKeys) - this is an Electron limitation, accelerators are defined as suchTesting
102 key UK keyboard (all platforms) & Macbook Pro UK keyboard (Mac)
Layouts - EN (US), EN (UK), ES (Spain), FR (France), DE (Germany)
Whitelisted Keys
Modifiers -
Ctrl
,Alt
,Meta
,Command
Letters -
KeyA
-KeyZ
Numbers -
Digit0
-Digit9
Arrow keys
Punctuation - limited to
Comma
,Period
,Slash
as most of these keys are problematic across different layouts.Function keys - apart from F12 because it doesn't work on Windows.
Numpad keys - apart from
Numlock
&NumpadEnter
, which don't work.Escape
Space
Enter
TODO: