mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-15 06:30:13 +08:00
cmd-k to clear the terminal (fixes #39)
This commit is contained in:
parent
f4eb03fee0
commit
c087a969d6
@ -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)
|
||||
|
@ -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-+',
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user