Set platform based on server (#32)

* Set platform based on server

Had to refactor a bit to ensure our values get set before VS Code tries
to use them.

* Pave the way for mnemonics on all platforms

* Fix context menus on Mac

* Fix a bunch of things on Mac including menu bar

* Set keybindings based on client's OS
This commit is contained in:
Asher
2019-02-26 12:01:14 -06:00
committed by GitHub
parent 0c2c957312
commit 14da71499f
18 changed files with 976 additions and 444 deletions

View File

@@ -8,7 +8,7 @@ import { ToggleDevToolsAction } from "vs/workbench/electron-browser/actions/deve
import { TerminalPasteAction } from "vs/workbench/parts/terminal/electron-browser/terminalActions";
import { KEYBINDING_CONTEXT_TERMINAL_FOCUS } from "vs/workbench/parts/terminal/common/terminal";
import { KeyCode, KeyMod } from "vs/base/common/keyCodes";
import { client } from "../client";
import { workbench } from "../workbench";
// Intercept adding workbench actions so we can skip actions that won't work or
// modify actions that need different conditions, keybindings, etc.
@@ -32,7 +32,7 @@ registry.registerWorkbenchAction = (descriptor: SyncActionDescriptor, alias: str
mac: { primary: 0 },
};
// tslint:disable-next-line no-any override private
(descriptor as any)._keybindingContext = ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, client.clipboardContextKey);
(descriptor as any)._keybindingContext = ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, workbench.clipboardContextKey);
}
return originalRegister(descriptor, alias, category, when);