tabby/tabby-serial/src/hotkeys.ts

24 lines
668 B
TypeScript
Raw Permalink Normal View History

import { Injectable } from '@angular/core'
2022-01-08 23:02:56 +08:00
import { HotkeyDescription, HotkeyProvider, TranslateService } from 'tabby-core'
/** @hidden */
@Injectable()
export class SerialHotkeyProvider extends HotkeyProvider {
hotkeys: HotkeyDescription[] = [
{
id: 'serial',
2022-01-08 23:02:56 +08:00
name: this.translate.instant('Show Serial connections'),
},
2021-02-13 19:49:07 +08:00
{
id: 'restart-serial-session',
2022-01-08 23:02:56 +08:00
name: this.translate.instant('Restart current serial session'),
2021-02-13 19:49:07 +08:00
},
]
2022-01-08 23:02:56 +08:00
constructor (private translate: TranslateService) { super() }
async provide (): Promise<HotkeyDescription[]> {
return this.hotkeys
}
}