Results 1 to 2 of 2

Thread: Keyboard shortcuts and wrapping Ext JS

  1. #1
    Sencha Premium Member EPV's Avatar
    Join Date
    Dec 2010
    Location
    Sweden
    Posts
    359
    Answers
    37
    Vote Rating
    46
      0  

    Default Keyboard shortcuts and wrapping Ext JS

    Been struggeling with the issues of using keyboard navigation in an Ext JS web application.

    Is it possible to use keys like "ctrl+s", "Backspace" or "F1" without messing with the browser?

    A fix would possible be to wrap the web-page in Titanium Desktop. Anyone with good/bad experinces with this? Other options?

    Thanks / E

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    This captures ctrl + s:

    Code:
    new Ext.util.KeyMap(document.body, {
        key  : 's',
        ctrl : true,
        fn   : function(keycode, e) {
            e.stopEvent();
    
            console.log('ctrl + s was pressed');
        }
    });
    I'm on Mac and the browser doesn't launch the save so I'm not sure if stopEvent will prevent the browser behavior.

    Wonder if the keydown event would be better.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •