From 0df328616b93a0ae0f2f41363eb73b91e8dfb5fd Mon Sep 17 00:00:00 2001 From: ppot Date: Tue, 14 Feb 2017 20:05:44 -0500 Subject: [PATCH] keys removes --- app/menus/menu.js | 16 ++-- app/menus/menu/window.js | 115 --------------------------- app/menus/{menu => menus}/darwin.js | 0 app/menus/{menu => menus}/edit.js | 0 app/menus/{menu => menus}/help.js | 0 app/menus/{menu => menus}/plugins.js | 0 app/menus/{menu => menus}/shell.js | 0 app/menus/{menu => menus}/view.js | 0 app/menus/menus/window.js | 76 ++++++++++++++++++ keymaps/base.json | 4 - keymaps/darwin.json | 6 +- keymaps/linux.json | 64 +++++++-------- keymaps/win32.json | 6 +- 13 files changed, 116 insertions(+), 171 deletions(-) delete mode 100644 app/menus/menu/window.js rename app/menus/{menu => menus}/darwin.js (100%) rename app/menus/{menu => menus}/edit.js (100%) rename app/menus/{menu => menus}/help.js (100%) rename app/menus/{menu => menus}/plugins.js (100%) rename app/menus/{menu => menus}/shell.js (100%) rename app/menus/{menu => menus}/view.js (100%) create mode 100644 app/menus/menus/window.js delete mode 100644 keymaps/base.json diff --git a/app/menus/menu.js b/app/menus/menu.js index c5e81c9d756f..acc7b0ccd222 100644 --- a/app/menus/menu.js +++ b/app/menus/menu.js @@ -6,15 +6,15 @@ module.exports = class Menu { constructor(commands, createWindow, updatePlugins) { this.commands = commands; - this.viewMenu = require('./menu/view')(commands); - this.shellMenu = require('./menu/shell')(commands, createWindow); - this.editMenu = require('./menu/edit')(commands); - this.pluginsMenu = require('./menu/plugins')(commands, updatePlugins); - this.windowMenu = require('./menu/window')(commands); - this.helpMenu = require('./menu/help')(os, app, shell); + this.viewMenu = require('./menus/view')(commands); + this.shellMenu = require('./menus/shell')(commands, createWindow); + this.editMenu = require('./menus/edit')(commands); + this.pluginsMenu = require('./menus/plugins')(commands, updatePlugins); + this.windowMenu = require('./menus/window')(commands); + this.helpMenu = require('./menus/help')(os, app, shell); if (process.platform === 'darwin') { - this.osxMenu = require('./subs/darwin')(commands, createWindow); + this.darwinMenu = require('./menus/darwin')(commands, createWindow); } else { this.editMenu.submenu.push( {type: 'separator'}, @@ -60,7 +60,7 @@ module.exports = class Menu { ); if (process.platform === 'darwin') { - menu.unshift(this.osxMenu); + menu.unshift(this.darwinMenu); } return menu; diff --git a/app/menus/menu/window.js b/app/menus/menu/window.js deleted file mode 100644 index 027db1b79aec..000000000000 --- a/app/menus/menu/window.js +++ /dev/null @@ -1,115 +0,0 @@ -module.exports = function (commands) { - return { - role: 'window', - submenu: [ - { - role: 'minimize', - accelerator: commands['window:minimize'] - }, - { - role: 'zoom' - }, - { - type: 'separator' - }, - { - label: 'Select Tab', - submenu: [ - { - label: 'Previous', - accelerator: commands['tab:prev'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Tab', arrow: 'Prev'}); - } - } - }, - { - label: 'Next', - accelerator: commands['tab:next'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Tab', arrow: 'Next'}); - } - } - } - ] - }, - { - type: 'separator' - }, - { - label: 'Select Pane', - submenu: [ - { - label: 'Above', - accelerator: commands['pane:up'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Pane', arrow: 'Up'}); - } - } - }, - { - label: 'Bellow', - accelerator: commands['pane:down'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Pane', arrow: 'Down'}); - } - } - }, - { - label: 'Left', - accelerator: commands['pane:left'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Pane', arrow: 'Left'}); - } - } - }, - { - label: 'Right', - accelerator: commands['pane:right'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Pane', arrow: 'Right'}); - } - } - }, - { - type: 'separator' - }, - { - label: 'Previous', - accelerator: commands['pane:prev'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Pane', arrow: 'Prev'}); - } - } - }, - { - label: 'Next', - accelerator: commands['pane:next'], - click(item, focusedWindow) { - if (focusedWindow) { - focusedWindow.rpc.emit('mv', {type: 'Pane', arrow: 'Next'}); - } - } - } - ] - }, - { - type: 'separator' - }, - { - role: 'front' - }, - { - role: 'togglefullscreen', - accelerators: commands['window:full'] - } - ] - }; -}; diff --git a/app/menus/menu/darwin.js b/app/menus/menus/darwin.js similarity index 100% rename from app/menus/menu/darwin.js rename to app/menus/menus/darwin.js diff --git a/app/menus/menu/edit.js b/app/menus/menus/edit.js similarity index 100% rename from app/menus/menu/edit.js rename to app/menus/menus/edit.js diff --git a/app/menus/menu/help.js b/app/menus/menus/help.js similarity index 100% rename from app/menus/menu/help.js rename to app/menus/menus/help.js diff --git a/app/menus/menu/plugins.js b/app/menus/menus/plugins.js similarity index 100% rename from app/menus/menu/plugins.js rename to app/menus/menus/plugins.js diff --git a/app/menus/menu/shell.js b/app/menus/menus/shell.js similarity index 100% rename from app/menus/menu/shell.js rename to app/menus/menus/shell.js diff --git a/app/menus/menu/view.js b/app/menus/menus/view.js similarity index 100% rename from app/menus/menu/view.js rename to app/menus/menus/view.js diff --git a/app/menus/menus/window.js b/app/menus/menus/window.js new file mode 100644 index 000000000000..cddfc9d81e07 --- /dev/null +++ b/app/menus/menus/window.js @@ -0,0 +1,76 @@ +module.exports = function (commands) { + return { + role: 'window', + submenu: [ + { + role: 'minimize', + accelerator: commands['window:minimize'] + }, + { + role: 'zoom' + }, + { + type: 'separator' + }, + { + label: 'Select Tab', + submenu: [ + { + label: 'Previous', + accelerator: commands['tab:prev'], + click(item, focusedWindow) { + if (focusedWindow) { + focusedWindow.rpc.emit('move left req'); + } + } + }, + { + label: 'Next', + accelerator: commands['tab:next'], + click(item, focusedWindow) { + if (focusedWindow) { + focusedWindow.rpc.emit('move right req'); + } + } + } + ] + }, + { + type: 'separator' + }, + { + label: 'Select Pane', + submenu: [ + { + label: 'Previous', + accelerator: commands['pane:prev'], + click(item, focusedWindow) { + if (focusedWindow) { + focusedWindow.rpc.emit('prev pane req'); + } + } + }, + { + label: 'Next', + accelerator: commands['pane:next'], + click(item, focusedWindow) { + if (focusedWindow) { + focusedWindow.rpc.emit('next pane req'); + } + } + } + ] + }, + { + type: 'separator' + }, + { + role: 'front' + }, + { + role: 'togglefullscreen', + accelerators: commands['window:full'] + } + ] + }; +}; diff --git a/keymaps/base.json b/keymaps/base.json deleted file mode 100644 index 31b6d5f521f9..000000000000 --- a/keymaps/base.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - 'hyper-tab': { - } -} \ No newline at end of file diff --git a/keymaps/darwin.json b/keymaps/darwin.json index bb35ede01836..01d5e045cbde 100644 --- a/keymaps/darwin.json +++ b/keymaps/darwin.json @@ -8,7 +8,7 @@ "zoom:out":"Cmd+-", "window:new":"Cmd+N", "window:minimize": "Cmd+M", - "window:full": "Cmd-Ctrl-F", + "window:full": "Cmd+Ctrl+F", "window:close":"Cmd+Shift+W", "tab:new":"Cmd+T", @@ -16,10 +16,6 @@ "tab:prev":"Cmd+shift+[", "pane:next":"Cmd+]", "pane:prev":"Cmd+[", - "pane:left":"Cmd+Alt+Left", - "pane:right":"Cmd+Alt+Right", - "pane:up":"Cmd+Alt+Up", - "pane:down":"Cmd+Alt+Down", "pane:vertical":"Cmd+D", "pane:horizontal":"Cmd+Shift+D", "pane:close":"Cmd+W", diff --git a/keymaps/linux.json b/keymaps/linux.json index 0c4f2a85ad84..a6471fe63765 100644 --- a/keymaps/linux.json +++ b/keymaps/linux.json @@ -1,36 +1,32 @@ { - "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": "F11", - "window:close":"Cmd+Shift+W", - - "tab:new":"Cmd+T", - "tab:next":"Cmd+shift+]", - "tab:prev":"Cmd+shift+[", - "pane:next":"Cmd+]", - "pane:prev":"Cmd+[", - "pane:left":"Cmd+Alt+Left", - "pane:right":"Cmd+Alt+Right", - "pane:up":"Cmd+Alt+Up", - "pane:down":"Cmd+Alt+Down", - "pane:vertical":"Cmd+D", - "pane:horizontal":"Cmd+Shift+D", - "pane:close":"Cmd+W", - - "editor:undo":"Cmd+Z", - "editor:redo":"Cmd+Shift+Z", - "editor:cut":"Cmd+X", - "editor:copy":"Cmd+C", - "editor:paste":"Cmd+V", - "editor:selectAll":"Cmd+A", - "editor:clearBuffer":"Cmd+K", - - "plugins:update": "Cmd+Shift+U" + "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", + + "editor:undo":"Ctrl+Shift+Z", + "editor:redo":"Ctrl+Shift+Z", + "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" } \ No newline at end of file diff --git a/keymaps/win32.json b/keymaps/win32.json index 8d6a672a70b6..a2d3e1498138 100644 --- a/keymaps/win32.json +++ b/keymaps/win32.json @@ -1,6 +1,6 @@ { "window:devtools":"Ctrl+Shift+I", - "window:reload":"Ctrl+R", + "window:reload":"Ctrl+Shift+R", "window:reloadFull":"Ctrl+Shift+F5", "window:preferences":"Ctrl+,", "zoom:reset":"Ctrl+0", @@ -16,10 +16,6 @@ "tab:prev":"Ctrl+shift+Tab", "pane:next":"Ctrl+Pageup", "pane:prev":"Ctrl+Pagedown", - "pane:left":"Ctrl+Alt+Left", - "pane:right":"Ctrl+Alt+Right", - "pane:up":"Ctrl+Alt+Up", - "pane:down":"Ctrl+Alt+Down", "pane:vertical":"Ctrl+Shift+D", "pane:horizontal":"Ctrl+Shift+E", "pane:close":"Ctrl+Shift+W",