1. #1
    Sencha Premium Member EPV's Avatar
    Join Date
    Dec 2010
    Location
    Sweden
    Posts
    197
    Vote Rating
    15
    Answers
    23
    EPV will become famous soon enough

      0  

    Default Unanswered: Keyboard shortcuts and wrapping Ext JS

    Unanswered: 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    873
    Answers
    3567
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread