Browse Source

recommend before-input-event in keyboard shortcuts tutorial

Zeke Sikelianos 7 years ago
parent
commit
637cec2a3d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      docs/tutorial/keyboard-shortcuts.md

+ 4 - 0
docs/tutorial/keyboard-shortcuts.md

@@ -52,6 +52,10 @@ window.addEventListener('keyup', doSomething, true)
 
 Note the third parameter `true` which means the listener will always receive key presses before other listeners so they can't have `stopPropagation()` called on them.
 
+The [`before-input-event`](web-contents.md#event-before-input-event) event
+is emitted before dispatching `keydown` and `keyup` events in the page. It can
+be used to catch and handle custom shortcuts that are not visible in the menu.
+
 If you don't want to do manual shortcut parsing there are libraries that do advanced key detection such as [mousetrap].
 
 ```js