From f846dfc6596dfc0ed8c42d5280d4c9ce932d0380 Mon Sep 17 00:00:00 2001 From: Fabricio Constantin Date: Sat, 11 Aug 2018 12:44:52 -0300 Subject: [PATCH] Add pause and unpause to api documentation --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4160ebd..b264e9c 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,20 @@ Removes and unbinds a hotkey hotkeys.del('ctrl+w'); ``` +#### hotkeys.pause() +Disable hotkey listener + +```js +hotkeys.pause(); +``` + +#### hotkeys.unpause() +Enable hotkey listener + +```js +hotkeys.unpause(); +``` + ### Allowing hotkeys in form elements By default, Mousetrap prevents hotkey callbacks from firing when their event originates from an `input`, `select`, or `textarea` element. To enable hotkeys in these elements, specify them in the `allowIn` parameter: ```js