From: Rigel Kent Date: Sun, 2 Sep 2018 19:46:43 +0000 (+0200) Subject: add a hotkey for menu toggling and a secondary hotkey to search X-Git-Tag: v1.0.0-beta.12~54 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=8542dc33e32ca28d542eaa9a25db7c20eccfd6f6;p=github%2FChocobozzz%2FPeerTube.git add a hotkey for menu toggling and a secondary hotkey to search --- diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 40eac7fb8..5086384f4 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -124,10 +124,14 @@ export class AppComponent implements OnInit { }) this.hotkeysService.add([ - new Hotkey('/', (event: KeyboardEvent): boolean => { + new Hotkey(['/', 's'], (event: KeyboardEvent): boolean => { document.getElementById('search-video').focus() - return false // Prevent bubbling + return false }, undefined, 'Focus the search bar'), + new Hotkey('b', (event: KeyboardEvent): boolean => { + this.toggleMenu() + return false + }, undefined, 'Toggle the left menu'), new Hotkey('g s', (event: KeyboardEvent): boolean => { this.router.navigate([ '/videos/subscriptions' ]) return false