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
    342
    Answers
    36
    Vote Rating
    42
      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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      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
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    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
  •