2015-06-30 08:43:55 +00:00
|
|
|
# Input Hotkey API
|
|
|
|
|
|
2015-07-31 08:05:30 +00:00
|
|
|
Allows keyboard shortcuts (hotkeys) to be bound to an element's click event.
|
2015-06-30 08:43:55 +00:00
|
|
|
|
|
|
|
|
# Example
|
|
|
|
|
|
2015-07-31 08:05:30 +00:00
|
|
|
<button
|
|
|
|
|
class="btn btn-default"
|
|
|
|
|
data-hotkey="b"
|
|
|
|
|
onclick="alert('B is for Banana!')">
|
2015-06-30 08:43:55 +00:00
|
|
|
Press "B" on your keyboard
|
|
|
|
|
</button>
|
|
|
|
|
|
2015-07-31 08:05:30 +00:00
|
|
|
<button
|
|
|
|
|
class="btn btn-default"
|
|
|
|
|
data-hotkey="shift+r"
|
|
|
|
|
onclick="confirm('Shift gears...?')">
|
2015-06-30 08:43:55 +00:00
|
|
|
Press "Shift + R" on your keyboard
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|