diff --git a/README.md b/README.md index c8307f6..5709d3c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # jQuery.Hotkeys [![Build Status](https://secure.travis-ci.org/jeresig/jquery.hotkeys.png)](http://travis-ci.org/jeresig/jquery.hotkeys) -#About +# About **jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. This plugin is based off of the plugin by Tzury Bar Yochay: [jQuery.hotkeys](https://github.com/tzuryby/jquery.hotkeys) @@ -74,14 +74,12 @@ Modifiers are not case sensitive (`Ctrl` == `ctrl` == `cTRL`) If you want to use more than one modifier (e.g. `alt+ctrl+z`) you should define them by an alphabetical order e.g. alt+ctrl+shift -Hotkeys aren't tracked if you're inside of an input element (unless you explicitly bind the hotkey directly to the input). This helps to avoid conflict with normal user typing. - You can use namespacing by adding a suffix to the event type (e.g. `keyup.toggle`) -## Hotkeys within inputs +### Hotkeys within inputs -Hotkeys aren't tracked if the user is focused within an input element or any element that has `contenteditable="true"` unless you bind the hotkey directly to the element. This helps to avoid conflict with normal user typing. +Hotkeys are still tracked if the user is focused within an input element or any element that has `contenteditable="true"`. If you don't want this, you can change the booleans of the following to suit: * `jQuery.hotkeys.options.filterInputAcceptingElements` diff --git a/jquery.hotkeys.js b/jquery.hotkeys.js index e7701f3..14ba6ec 100644 --- a/jquery.hotkeys.js +++ b/jquery.hotkeys.js @@ -118,7 +118,7 @@ "datetime-local", "search", "color", "tel"], // default input types not to bind to unless bound directly - textInputTypes: /textarea|input|select/i, + textInputTypes: /textarea|select/i, options: { filterInputAcceptingElements: true,