Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 5d1e980

Browse files
committed
Remove 'Close Pane' Shortcut. Change bindings for panes. Fixes #1056.
1 parent 1f3638f commit 5d1e980

File tree

4 files changed

+2
-31
lines changed

4 files changed

+2
-31
lines changed

src/Enums.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export enum KeyboardAction {
120120
// pane commands
121121
panePrevious,
122122
paneNext,
123-
paneClose,
124123
// edit/clipboard commands
125124
clipboardCopy,
126125
clipboardCut,

src/views/1_ApplicationComponent.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,6 @@ export class ApplicationComponent extends React.Component<{}, ApplicationState>
150150
return;
151151
}
152152

153-
// Close focused pane
154-
if (isKeybindingForEvent(event, KeyboardAction.paneClose) && jobFormComponent) {
155-
this.closeFocusedPane();
156-
157-
this.forceUpdate();
158-
159-
event.stopPropagation();
160-
event.preventDefault();
161-
return;
162-
}
163-
164153
// Change focussed tab
165154
if (isKeybindingForEvent(event, KeyboardAction.tabFocus)) {
166155
const position = parseInt(event.key, 10);

src/views/keyevents/Keybindings.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ export const KeybindingsForActions: KeybindingType[] = [
7272
return (e.ctrlKey && e.keyCode === KeyCode.N) || (e.keyCode === KeyCode.Down);
7373
},
7474
},
75-
// pane command
76-
{
77-
action: KeyboardAction.paneClose,
78-
keybinding: (e: KeyboardEvent) => isMeta(e) && e.keyCode === KeyCode.D,
79-
},
8075
// tab commands
8176
{
8277
action: KeyboardAction.tabFocus,
@@ -132,15 +127,11 @@ export const KeybindingsForMenu: KeybindingMenuType[] = [
132127
},
133128
{
134129
action: KeyboardAction.panePrevious,
135-
accelerator: `${CmdOrCtrl}+K`,
130+
accelerator: `Alt+[`,
136131
},
137132
{
138133
action: KeyboardAction.paneNext,
139-
accelerator: `${CmdOrCtrl}+J`,
140-
},
141-
{
142-
action: KeyboardAction.paneClose,
143-
accelerator: `${CmdOrCtrl}+P`,
134+
accelerator: `Alt+]`,
144135
},
145136
// edit/clipboard commands
146137
{

src/views/menu/Menu.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,6 @@ export function buildMenuTemplate(
197197
{
198198
type: "separator",
199199
},
200-
{
201-
label: "Close",
202-
accelerator: getAcceleratorForAction(KeyboardAction.paneClose),
203-
click: () => {
204-
application.closeFocusedPane();
205-
application.forceUpdate();
206-
},
207-
},
208200
],
209201
},
210202
{

0 commit comments

Comments
 (0)