PS ctrl-left, ctrl-right and ctrl-del bindings (#507, #2739)

This commit is contained in:
Eugene Pankov 2020-12-06 18:11:15 +01:00
parent e6fd31e0b0
commit 17f52a257e
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -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