mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00: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') {
|
if (hotkey === 'copy') {
|
||||||
this.hterm.copySelectionToClipboard()
|
this.hterm.copySelectionToClipboard()
|
||||||
}
|
}
|
||||||
|
if (hotkey === 'clear') {
|
||||||
|
this.clear()
|
||||||
|
}
|
||||||
if (hotkey === 'zoom-in') {
|
if (hotkey === 'zoom-in') {
|
||||||
this.zoomIn()
|
this.zoomIn()
|
||||||
}
|
}
|
||||||
@ -234,6 +237,11 @@ export class TerminalTabComponent extends BaseTabComponent {
|
|||||||
this.io.writeUTF8(data)
|
this.io.writeUTF8(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clear () {
|
||||||
|
this.hterm.wipeContents()
|
||||||
|
this.hterm.onVTKeystroke('\f')
|
||||||
|
}
|
||||||
|
|
||||||
async configure (): Promise<void> {
|
async configure (): Promise<void> {
|
||||||
let config = this.config.store
|
let config = this.config.store
|
||||||
preferenceManager.set('font-family', config.terminal.font)
|
preferenceManager.set('font-family', config.terminal.font)
|
||||||
|
@ -47,6 +47,9 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
'copy': [
|
'copy': [
|
||||||
'⌘-C',
|
'⌘-C',
|
||||||
],
|
],
|
||||||
|
'clear': [
|
||||||
|
'⌘-K',
|
||||||
|
],
|
||||||
'zoom-in': [
|
'zoom-in': [
|
||||||
'⌘-=',
|
'⌘-=',
|
||||||
'⌘-Shift-+',
|
'⌘-Shift-+',
|
||||||
@ -75,6 +78,9 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
'copy': [
|
'copy': [
|
||||||
'Ctrl-Shift-C',
|
'Ctrl-Shift-C',
|
||||||
],
|
],
|
||||||
|
'clear': [
|
||||||
|
'Ctrl-L',
|
||||||
|
],
|
||||||
'zoom-in': [
|
'zoom-in': [
|
||||||
'Ctrl-=',
|
'Ctrl-=',
|
||||||
'Ctrl-Shift-+',
|
'Ctrl-Shift-+',
|
||||||
@ -102,6 +108,9 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
'copy': [
|
'copy': [
|
||||||
'Ctrl-Shift-C',
|
'Ctrl-Shift-C',
|
||||||
],
|
],
|
||||||
|
'clear': [
|
||||||
|
'Ctrl-L',
|
||||||
|
],
|
||||||
'zoom-in': [
|
'zoom-in': [
|
||||||
'Ctrl-=',
|
'Ctrl-=',
|
||||||
'Ctrl-Shift-+',
|
'Ctrl-Shift-+',
|
||||||
|
@ -8,6 +8,10 @@ export class TerminalHotkeyProvider extends HotkeyProvider {
|
|||||||
id: 'copy',
|
id: 'copy',
|
||||||
name: 'Copy to clipboard',
|
name: 'Copy to clipboard',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'clear',
|
||||||
|
name: 'Clear terminal',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'zoom-in',
|
id: 'zoom-in',
|
||||||
name: 'Zoom in',
|
name: 'Zoom in',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user