Custom Keyboard Shortcuts RRS feed

  • Question

  • How do I create custom keyboard shortcuts for my application?  I am designing a touch-first interface but I also want to make it keyboard friendly....


    Saturday, May 26, 2012 6:21 PM


  • Hi

    The Metro style app using JavaScript platform supports shortcut key functionality for setting focus or invoking elements, but you must implement shortcut keys in JavaScript by using keyboard event handlers.

        var sendButton = document.getElementById('sendButton');
        sendButton.addEventListener('keyup', function(e) {
            var itm = e.srcElement;
            if (e.ctrlKey && e.keyCode === 83 ) {
                // Invoke send functionality.

    Please refer to this link for more details.


    Search: Keyboard shortcuts (optional)    to get the scenario.

    Hope it helpful.


    • Proposed as answer by Dino He Monday, May 28, 2012 12:43 PM
    • Marked as answer by Dino He Friday, June 1, 2012 7:32 AM
    Monday, May 28, 2012 3:18 AM