From 17f52a257ebc688397b45a0480f1b88ad10ab35c Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sun, 6 Dec 2020 18:11:15 +0100 Subject: [PATCH] PS ctrl-left, ctrl-right and ctrl-del bindings (#507, #2739) --- .../src/api/baseTerminalTab.component.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/terminus-terminal/src/api/baseTerminalTab.component.ts b/terminus-terminal/src/api/baseTerminalTab.component.ts index d949146a..b622b020 100644 --- a/terminus-terminal/src/api/baseTerminalTab.component.ts +++ b/terminus-terminal/src/api/baseTerminalTab.component.ts @@ -156,16 +156,28 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit this.resetZoom() break case 'previous-word': - this.sendInput('\x1bb') + this.sendInput({ + [Platform.Windows]: '\x1b[1;5D', + [Platform.macOS]: '\x1bb', + [Platform.Linux]: '\x1bb', + }[this.hostApp.platform]) break case 'next-word': - this.sendInput('\x1bf') + this.sendInput({ + [Platform.Windows]: '\x1b[1;5C', + [Platform.macOS]: '\x1bf', + [Platform.Linux]: '\x1bf', + }[this.hostApp.platform]) break case 'delete-previous-word': this.sendInput('\x1b\x7f') break case 'delete-next-word': - this.sendInput('\x1bd') + this.sendInput({ + [Platform.Windows]: '\x1bd\x1b[3;5~', + [Platform.macOS]: '\x1bd', + [Platform.Linux]: '\x1bd', + }[this.hostApp.platform]) break case 'search': this.showSearchPanel = true