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
    5,035
    Answers
    390
    Vote Rating
    185
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    What is STGR?

  3. #3
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,596
    Answers
    541
    Vote Rating
    324
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      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.

Thread Participants: 2