Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.isDisposed) {
return;
}
this.session.send({
type: 'stdin',
content: [data]
});
});
term.onTitleChange((title: string) => {
this.title.label = title;
});
// Do not add any Ctrl+C/Ctrl+V handling on macOS,
// where Cmd+C/Cmd+V works as intended.
if (Platform.IS_MAC) {
return;
}
term.attachCustomKeyEventHandler(event => {
if (event.ctrlKey && event.key === 'c' && term.hasSelection()) {
// Return so that the usual OS copy happens
// instead of interrupt signal.
return false;
}
if (event.ctrlKey && event.key === 'v' && this._options.pasteWithCtrlV) {
// Return so that the usual paste happens.
return false;
}
return true;
function normalizeKeys(options: IKeyBindingOptions): string[] {
let keys: string[];
if (Platform.IS_WIN) {
keys = options.winKeys || options.keys;
} else if (Platform.IS_MAC) {
keys = options.macKeys || options.keys;
} else {
keys = options.linuxKeys || options.keys;
}
return keys.map(normalizeKeystroke);
}