mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
copy hotkey for macOS (fixes #61)
This commit is contained in:
parent
fc060acd88
commit
deb4b963cd
@ -69,6 +69,12 @@ export class TerminalTabComponent extends BaseTabComponent {
|
|||||||
this.session.releaseInitialDataBuffer()
|
this.session.releaseInitialDataBuffer()
|
||||||
})
|
})
|
||||||
this.hotkeysSubscription = this.hotkeys.matchedHotkey.subscribe(hotkey => {
|
this.hotkeysSubscription = this.hotkeys.matchedHotkey.subscribe(hotkey => {
|
||||||
|
if (!this.hasFocus) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (hotkey === 'copy') {
|
||||||
|
this.hterm.copySelectionToClipboard()
|
||||||
|
}
|
||||||
if (hotkey === 'zoom-in') {
|
if (hotkey === 'zoom-in') {
|
||||||
this.zoomIn()
|
this.zoomIn()
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,9 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
shell: '~default-shell~',
|
shell: '~default-shell~',
|
||||||
},
|
},
|
||||||
hotkeys: {
|
hotkeys: {
|
||||||
|
'copy': [
|
||||||
|
'⌘-C',
|
||||||
|
],
|
||||||
'zoom-in': [
|
'zoom-in': [
|
||||||
'⌘-=',
|
'⌘-=',
|
||||||
'⌘-Shift-+',
|
'⌘-Shift-+',
|
||||||
@ -69,6 +72,9 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
shell: '~clink~',
|
shell: '~clink~',
|
||||||
},
|
},
|
||||||
hotkeys: {
|
hotkeys: {
|
||||||
|
'copy': [
|
||||||
|
'Ctrl-Shift-C',
|
||||||
|
],
|
||||||
'zoom-in': [
|
'zoom-in': [
|
||||||
'Ctrl-=',
|
'Ctrl-=',
|
||||||
'Ctrl-Shift-+',
|
'Ctrl-Shift-+',
|
||||||
@ -93,6 +99,9 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
shell: '~default-shell~',
|
shell: '~default-shell~',
|
||||||
},
|
},
|
||||||
hotkeys: {
|
hotkeys: {
|
||||||
|
'copy': [
|
||||||
|
'Ctrl-Shift-C',
|
||||||
|
],
|
||||||
'zoom-in': [
|
'zoom-in': [
|
||||||
'Ctrl-=',
|
'Ctrl-=',
|
||||||
'Ctrl-Shift-+',
|
'Ctrl-Shift-+',
|
||||||
|
@ -4,6 +4,10 @@ import { IHotkeyDescription, HotkeyProvider } from 'terminus-core'
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class TerminalHotkeyProvider extends HotkeyProvider {
|
export class TerminalHotkeyProvider extends HotkeyProvider {
|
||||||
hotkeys: IHotkeyDescription[] = [
|
hotkeys: IHotkeyDescription[] = [
|
||||||
|
{
|
||||||
|
id: 'copy',
|
||||||
|
name: 'Copy to clipboard',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'zoom-in',
|
id: 'zoom-in',
|
||||||
name: 'Zoom in',
|
name: 'Zoom in',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user