2020-02-25 01:42:28 +08:00
|
|
|
import { Injectable } from '@angular/core'
|
2022-01-08 23:02:56 +08:00
|
|
|
import { HotkeyDescription, HotkeyProvider, TranslateService } from 'tabby-core'
|
2020-02-25 01:42:28 +08:00
|
|
|
|
|
|
|
|
/** @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'),
|
2020-02-25 01:42:28 +08:00
|
|
|
},
|
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
|
|
|
},
|
2020-02-25 01:42:28 +08:00
|
|
|
]
|
|
|
|
|
|
2022-01-08 23:02:56 +08:00
|
|
|
constructor (private translate: TranslateService) { super() }
|
|
|
|
|
|
2020-02-25 01:42:28 +08:00
|
|
|
async provide (): Promise<HotkeyDescription[]> {
|
|
|
|
|
return this.hotkeys
|
|
|
|
|
}
|
|
|
|
|
}
|