winter/modules/system/assets/ui/docs/input-hotkey.md
2015-07-31 18:05:30 +10:00

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>