Shortcut

Summary

The Shortcut pattern letst you define keyboard shortcuts which can be bind to actions.

There are no attributes defined for this pattern.

Example

Press Shift+? to show an alert.

Press w, t to redirect to http://waltertamboer.nl

Markup

<script>
    zui.Shortcut.on("Shift+?").invoke(function () {
        alert("I'll be happy to explain things to you!");
    });

    zui.Shortcut.on("w, t").redirect('http://waltertamboer.nl');
</script>
Fork me on GitHub