Results 1 to 2 of 2

Thread: Capture ESC in dataview

  1. #1
    Sencha User
    Join Date
    Apr 2017
    Posts
    11
    Answers
    1

    Default Capture ESC in dataview

    Hello forum users.

    I'm trying to capture the escape key in a dataview showing thumbnail images. The idea is to have escape to deselect all made selections.
    I've configured a keyMap that works for most keys but not for escape.

    Is escape captured by something else (e.g. the browser) that overrides my keymap definition? Can someone please tell me whats missing in the configuration to get my dataview to capture the escape key?

    I'm using ExtJS 6.6, modern.
    A fiddle showing my attempt: https://fiddle.sencha.com/#view/editor&fiddle/2jni where pressed keys are logged.

    Mikael

  2. #2
    Sencha User
    Join Date
    Apr 2017
    Posts
    11
    Answers
    1

    Default

    I have an ugly workaround, using a global event listener on document.onkeyup and document.onkeydown and keeping a global state for pressed keys (esc and ctrl). This is the same solution as presented in my other thread Ctrl click to select/deselect in dataview: https://www.sencha.com/forum/showthr...ct-in-dataview

    This is probably not an efficient solution so if you have a better solution, please share.

    The solution is in a fiddle: https://fiddle.sencha.com/#view/editor&fiddle/2jt4



    Mikael

Similar Threads

  1. Replies: 0
    Last Post: 21 Feb 2017, 12:57 PM
  2. Replies: 2
    Last Post: 12 Jan 2012, 9:52 AM
  3. DataView Drag Issue: After creating first Portlet into Portal from DataView
    By amitkrgarg in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 7 Apr 2010, 1:24 PM

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
  •