Skip to content

Commit

Permalink
keys removes
Browse files Browse the repository at this point in the history
  • Loading branch information
ppot committed Feb 15, 2017
1 parent 7517704 commit 0df3286
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 171 deletions.
16 changes: 8 additions & 8 deletions app/menus/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down Expand Up @@ -60,7 +60,7 @@ module.exports = class Menu {
);

if (process.platform === 'darwin') {
menu.unshift(this.osxMenu);
menu.unshift(this.darwinMenu);
}

return menu;
Expand Down
115 changes: 0 additions & 115 deletions app/menus/menu/window.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
76 changes: 76 additions & 0 deletions app/menus/menus/window.js
Original file line number Diff line number Diff line change
@@ -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']
}
]
};
};
4 changes: 0 additions & 4 deletions keymaps/base.json

This file was deleted.

6 changes: 1 addition & 5 deletions keymaps/darwin.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
"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",
"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",
Expand Down
64 changes: 30 additions & 34 deletions keymaps/linux.json
Original file line number Diff line number Diff line change
@@ -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"
}
6 changes: 1 addition & 5 deletions keymaps/win32.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 0df3286

Please sign in to comment.