parent
6799395da0
commit
af0ec1caa0
2 changed files with 13 additions and 1 deletions
|
@ -19,7 +19,7 @@ import { getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess';
|
|||
import { Extensions as ViewContainerExtensions, IViewContainersRegistry, ViewContainerLocation, IViewsRegistry } from 'vs/workbench/common/views';
|
||||
import { registerTerminalActions, terminalSendSequenceCommand } from 'vs/workbench/contrib/terminal/browser/terminalActions';
|
||||
import { TerminalViewPane } from 'vs/workbench/contrib/terminal/browser/terminalView';
|
||||
import { KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY, KEYBINDING_CONTEXT_TERMINAL_FOCUS, TERMINAL_VIEW_ID, TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY, KEYBINDING_CONTEXT_TERMINAL_FOCUS, TERMINAL_VIEW_ID, TERMINAL_COMMAND_ID, KEYBINDING_CONTEXT_IPAD } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { registerColors } from 'vs/workbench/contrib/terminal/common/terminalColorRegistry';
|
||||
import { setupTerminalCommands } from 'vs/workbench/contrib/terminal/browser/terminalCommands';
|
||||
import { setupTerminalMenu } from 'vs/workbench/contrib/terminal/common/terminalMenu';
|
||||
|
@ -35,6 +35,7 @@ import { terminalConfiguration } from 'vs/workbench/contrib/terminal/common/term
|
|||
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { terminalViewIcon } from 'vs/workbench/contrib/terminal/browser/terminalIcons';
|
||||
import { RemoteTerminalService } from 'vs/workbench/contrib/terminal/browser/remoteTerminalService';
|
||||
import { isIPad } from 'vs/base/browser/browser';
|
||||
|
||||
// Register services
|
||||
registerSingleton(ITerminalService, TerminalService, true);
|
||||
|
@ -119,6 +120,14 @@ if (platform.isWindows) {
|
|||
});
|
||||
}
|
||||
|
||||
// send ctrl+c to the iPad when the terminal is focused and ctrl+c is pressed to kill the process
|
||||
if (isIPad) {
|
||||
registerSendSequenceKeybinding(String.fromCharCode('C'.charCodeAt(0) - CTRL_LETTER_OFFSET), { // ctrl+c
|
||||
when: ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_IPAD),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C
|
||||
});
|
||||
}
|
||||
|
||||
// Delete word left: ctrl+w
|
||||
registerSendSequenceKeybinding(String.fromCharCode('W'.charCodeAt(0) - CTRL_LETTER_OFFSET), {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Backspace,
|
||||
|
|
|
@ -24,6 +24,9 @@ export const KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY = 'terminalShellType';
|
|||
/** A context key that is set to the detected shell for the most recently active terminal, this is set to the last known value when no terminals exist. */
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE = new RawContextKey<string>(KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY, undefined, { type: 'string', description: nls.localize('terminalShellTypeContextKey', "The shell type of the active terminal") });
|
||||
|
||||
export const KEYBINDING_CONTEXT_IPAD_KEY = 'isIPad';
|
||||
export const KEYBINDING_CONTEXT_IPAD = new RawContextKey(KEYBINDING_CONTEXT_IPAD_KEY, false, nls.localize(KEYBINDING_CONTEXT_IPAD_KEY, 'Whether the device is an ipad'));
|
||||
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_ALT_BUFFER_ACTIVE = new RawContextKey<boolean>('terminalAltBufferActive', false, true);
|
||||
|
||||
/** A context key that is set when the integrated terminal does not have focus. */
|
||||
|
|
Loading…
Reference in a new issue