This repository has been archived by the owner on Dec 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uppercase all key combinations for consistent serialization
Issue #1283
- Loading branch information
1 parent
5aadac0
commit 6295286
Showing
4 changed files
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
const mods = [ | ||
'ctrl', // Windows, Linux | ||
'cmd' // macOS | ||
'Control', // Windows, Linux | ||
'Meta' // macOS | ||
]; | ||
|
||
export default Object.assign(...mods.map(mod => ({ | ||
export default Object.entries(Object.assign(...mods.map(mod => ({ | ||
[`${mod}+l`]: 'Focus address bar', | ||
[`${mod}+t`]: 'New tab', | ||
[`${mod}+w`]: 'Close tab' | ||
}))); | ||
})))).reduce((blacklist, pair) => { | ||
const [key, value] = pair; | ||
|
||
blacklist[key.toUpperCase()] = value; | ||
|
||
return blacklist; | ||
}, {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const mod = 'ctrl'; | ||
const mod = 'Control'; | ||
|
||
export default { | ||
/* Global context */ | ||
|