1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-28 21:13:18 +03:00

cmd-k to clear the terminal (fixes #39)

This commit is contained in:
Eugene Pankov 2017-07-05 19:31:58 +02:00
parent f4eb03fee0
commit c087a969d6
3 changed files with 21 additions and 0 deletions

View File

@ -75,6 +75,9 @@ export class TerminalTabComponent extends BaseTabComponent {
if (hotkey === 'copy') {
this.hterm.copySelectionToClipboard()
}
if (hotkey === 'clear') {
this.clear()
}
if (hotkey === 'zoom-in') {
this.zoomIn()
}
@ -234,6 +237,11 @@ export class TerminalTabComponent extends BaseTabComponent {
this.io.writeUTF8(data)
}
clear () {
this.hterm.wipeContents()
this.hterm.onVTKeystroke('\f')
}
async configure (): Promise<void> {
let config = this.config.store
preferenceManager.set('font-family', config.terminal.font)

View File

@ -47,6 +47,9 @@ export class TerminalConfigProvider extends ConfigProvider {
'copy': [
'⌘-C',
],
'clear': [
'⌘-K',
],
'zoom-in': [
'⌘-=',
'⌘-Shift-+',
@ -75,6 +78,9 @@ export class TerminalConfigProvider extends ConfigProvider {
'copy': [
'Ctrl-Shift-C',
],
'clear': [
'Ctrl-L',
],
'zoom-in': [
'Ctrl-=',
'Ctrl-Shift-+',
@ -102,6 +108,9 @@ export class TerminalConfigProvider extends ConfigProvider {
'copy': [
'Ctrl-Shift-C',
],
'clear': [
'Ctrl-L',
],
'zoom-in': [
'Ctrl-=',
'Ctrl-Shift-+',

View File

@ -8,6 +8,10 @@ export class TerminalHotkeyProvider extends HotkeyProvider {
id: 'copy',
name: 'Copy to clipboard',
},
{
id: 'clear',
name: 'Clear terminal',
},
{
id: 'zoom-in',
name: 'Zoom in',