-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
210 additions
and
224 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const {readFileSync} = require('fs'); | ||
const {join} = require('path'); | ||
const _paths = require('./paths'); | ||
|
||
const _keys = function (customsKeys) { | ||
const commands = {}; | ||
const keys = {}; | ||
const path = () => { | ||
switch (process.platform) { | ||
case 'darwin': return join(_paths.keymapPath, 'darwin.json'); | ||
case 'win32': return join(_paths.keymapPath, 'win32.json'); | ||
case 'linux': return join(_paths.keymapPath, 'linux.json'); | ||
default: return join(_paths.keymapPath, 'darwin.json'); | ||
} | ||
}; | ||
try { | ||
const cmds = JSON.parse(readFileSync(path())); | ||
for (const command in cmds) { | ||
if (command) { | ||
commands[command] = cmds[command]; | ||
keys[commands[command]] = command; | ||
} | ||
} | ||
|
||
if (customsKeys) { | ||
for (const command in customsKeys) { | ||
if (command) { | ||
commands[command] = customsKeys[command]; | ||
keys[customsKeys[command]] = command; | ||
} | ||
} | ||
} | ||
|
||
return {commands, keys}; | ||
} catch (err) { | ||
} | ||
}; | ||
|
||
module.exports = _keys; |
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 was deleted.
Oops, something went wrong.
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,33 +1,33 @@ | ||
{ | ||
"window:devtools":"Cmd+Alt+I", | ||
"window:reload":"Cmd+R", | ||
"window:reloadFull":"Cmd+Shift+R", | ||
"window:preferences":"Cmd+,", | ||
"zoom:reset":"Cmd+0", | ||
"zoom:in":"Cmd+plus", | ||
"zoom:out":"Cmd+-", | ||
"window:new":"Cmd+N", | ||
"window:minimize": "Cmd+M", | ||
"window:full": "Cmd+Ctrl+F", | ||
"window:close":"Cmd+Shift+W", | ||
"window:devtools":"cmd+alt+i", | ||
"window:reload":"cmd+r", | ||
"window:reloadFull":"cmd+shift+r", | ||
"window:preferences":"cmd+,", | ||
"zoom:reset":"cmd+0", | ||
"zoom:in":"cmd+plus", | ||
"zoom:out":"cmd+-", | ||
"window:new":"cmd+n", | ||
"window:minimize": "cmd+m", | ||
"window:full": "cmd+ctrl+f", | ||
"window:close":"cmd+shift+w", | ||
|
||
"tab:new":"Cmd+T", | ||
"tab:next":"Cmd+shift+]", | ||
"tab:prev":"Cmd+shift+[", | ||
"pane:next":"Cmd+]", | ||
"pane:prev":"Cmd+[", | ||
"pane:vertical":"Cmd+D", | ||
"pane:horizontal":"Cmd+Shift+D", | ||
"pane:close":"Cmd+W", | ||
"tab:new":"cmd+t", | ||
"tab:next":"cmd+shift+]", | ||
"tab:prev":"cmd+shift+[", | ||
"pane:next":"cmd+]", | ||
"pane:prev":"cmd+[", | ||
"pane:vertical":"cmd+d", | ||
"pane:horizontal":"cmd+shift+d", | ||
"pane:close":"cmd+w", | ||
|
||
"editor:undo":"Cmd+Z", | ||
"editor:redo":"Cmd+Y", | ||
"editor:cut":"Cmd+X", | ||
"editor:copy":"Cmd+C", | ||
"editor:paste":"Cmd+V", | ||
"editor:selectAll":"Cmd+A", | ||
"editor:clearBuffer":"Cmd+K", | ||
"editor:emojis": "Cmd+Ctrl+Space", | ||
"editor:undo":"cmd+z", | ||
"editor:redo":"cmd+y", | ||
"editor:cut":"cmd+x", | ||
"editor:copy":"cmd+c", | ||
"editor:paste":"cmd+v", | ||
"editor:selectAll":"cmd+a", | ||
"editor:clearBuffer":"cmd+k", | ||
"editor:emojis": "cmd+ctrl+space", | ||
|
||
"plugins:update": "Cmd+Shift+U" | ||
"plugins:update": "cmd+shift+u" | ||
} |
This file was deleted.
Oops, something went wrong.
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,32 +1,32 @@ | ||
{ | ||
"window:devtools":"Ctrl+Shift+I", | ||
"window:reload":"Ctrl+Shift+R", | ||
"window:reloadFull":"Ctrl+Shift+F5", | ||
"window:preferences":"Ctrl+,", | ||
"zoom:reset":"Ctrl+0", | ||
"zoom:in":"Ctrl+plus", | ||
"zoom:out":"Ctrl+-", | ||
"window:new":"Ctrl+Shift+N", | ||
"window:minimize": "Ctrl+M", | ||
"window:full": "F11", | ||
"window:close":"Ctrl+Shift+W", | ||
"window:devtools":"ctrl+shift+i", | ||
"window:reload":"ctrl+shift+r", | ||
"window:reloadFull":"ctrl+shift+f5", | ||
"window:preferences":"ctrl+,", | ||
"zoom:reset":"ctrl+0", | ||
"zoom:in":"ctrl+plus", | ||
"zoom:out":"ctrl+-", | ||
"window:new":"ctrl+shift+n", | ||
"window:minimize": "ctrl+m", | ||
"window:full": "f11", | ||
"window:close":"ctrl+shift+w", | ||
|
||
"tab:new":"Ctrl+Shift+T", | ||
"tab:next":"Ctrl+Tab", | ||
"tab:prev":"Ctrl+shift+Tab", | ||
"pane:next":"Ctrl+Pageup", | ||
"pane:prev":"Ctrl+Pagedown", | ||
"pane:vertical":"Ctrl+Shift+D", | ||
"pane:horizontal":"Ctrl+Shift+E", | ||
"pane:close":"Ctrl+Shift+W", | ||
"tab:new":"ctrl+shift+t", | ||
"tab:next":"ctrl+tab", | ||
"tab:prev":"ctrl+shift+tab", | ||
"pane:next":"ctrl+pageup", | ||
"pane:prev":"ctrl+pagedown", | ||
"pane:vertical":"ctrl+shift+d", | ||
"pane:horizontal":"ctrl+shift+e", | ||
"pane:close":"ctrl+shift+w", | ||
|
||
"editor:undo":"Ctrl+Shift+Z", | ||
"editor:redo":"Ctrl+Shift+Y", | ||
"editor:cut":"Ctrl+Shift+X", | ||
"editor:copy":"Ctrl+Shift+C", | ||
"editor:paste":"Ctrl+Shift+V", | ||
"editor:selectAll":"Ctrl+Shift+A", | ||
"editor:clearBuffer":"Ctrl+Shift+K", | ||
"editor:undo":"ctrl+shift+z", | ||
"editor:redo":"ctrl+shift+y", | ||
"editor:cut":"ctrl+shift+x", | ||
"editor:copy":"ctrl+shift+c", | ||
"editor:paste":"ctrl+shift+v", | ||
"editor:selectAll":"ctrl+shift+a", | ||
"editor:clearBuffer":"ctrl+shift+k", | ||
|
||
"plugins:update": "Ctrl+Shift+U" | ||
"plugins:update": "ctrl+shift+u" | ||
} |
Oops, something went wrong.