1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    24
    Vote Rating
    0
    ishak1981 is on a distinguished road

      0  

    Post Unanswered: multiple Keylistener on a Grid

    Unanswered: multiple Keylistener on a Grid


    How can I add a multiple Keylistener like STGR+A on a Grid?
    I tried with
    HTML Code:
    personGrid.addListener(KeyNav.getKeyEvent(),
                    new Listener<GridEvent<BeanModel>>() {
    if(be.getKeyCode()==17 && be.getKeyCode()==65)
    ...
    , but it didn't work.

    Thanks.
    Isak

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    2,216
    Vote Rating
    61
    Answers
    165
    slemmon is just really nice slemmon is just really nice slemmon is just really nice slemmon is just really nice

      0  

    Default


    What is STGR?

  3. #3
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,081
    Vote Rating
    112
    Answers
    454
    skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold

      0  

    Default


    I assume you mean STRG rather than STGR. Strg is short for Steuerung, German for control.

    It looks like you're using Ext GWT. This forum is for ExtJS 4, there is a separate forum for Ext GWT.

    In ExtJS you could check for Ctrl+A with something like this:

    Code:
    if (ev.getKey() === ev.A && ev.ctrlKey) {
        ...
    }
    Here ev.A is just a constant equal to 65.