mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
451 B
451 B
Input Hotkey API
Allows keyboard shortcuts (hotkeys) to be bound to an element's click event.
Example
<button
class="btn btn-default"
data-hotkey="b"
onclick="alert('B is for Banana!')">
Press "B" on your keyboard
</button>
<button
class="btn btn-default"
data-hotkey="shift+r"
onclick="confirm('Shift gears...?')">
Press "Shift + R" on your keyboard
</button>