-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Keycodes package modifiers usage and adding missing JSDocs. #11855
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
Changes from 4 commits
3ac0e18
6fd9de2
d194732
d280c62
d241f52
527292d
39cc2ed
f1ca029
b39cd29
9723760
810c1a5
6acf004
bf564d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,7 @@ const modifiers = { | |
| alt: () => [ ALT ], | ||
| ctrlShift: () => [ CTRL, SHIFT ], | ||
| shift: () => [ SHIFT ], | ||
| shiftAlt: () => [ SHIFT, ALT ], | ||
| shiftAlt: ( _isApple ) => _isApple() ? [ 'Shift', 'Alt' ] : [ 'Shift', 'Control' ], | ||
| }; | ||
|
|
||
| /** | ||
|
|
@@ -65,7 +65,7 @@ const modifiers = { | |
| */ | ||
| export const rawShortcut = mapValues( modifiers, ( modifier ) => { | ||
| return ( character, _isApple = isAppleOS ) => { | ||
| return [ ...modifier( _isApple ), character.toLowerCase() ].join( '+' ); | ||
| return [ ...modifier( _isApple ), character.toLowerCase() ].filter( ( key ) => key !== '' ).join( '+' ); | ||
|
||
| }; | ||
| } ); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.