Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
585
keydown or keypress event does not pick up Ctrl key
posted

I have keydown, keypress and keyup events hooked up with a datepicker column.  However, pressing the Ctrl key does not fire any events and releasing the Ctrl key fires the keyup event. When you look into the evt parameter, evt.ctrlKey is set to False, evt.keyCode = 17 which is the correct keyCode of the Ctrl key.

In the WebDateChooser used by UltraWebGrid, pressing Ctrl + D will fire keydown event and from the evt parameter, evt.ctrlKey has a True value. Therefore, we can handle custom logic (set today's date to the cell) under this condition:

if (evt.keyCode == 68 && evt.ctrlKey) {}

Attached is the sample that can show the Ctrl key problem. 

Thanks!

Ctrl-D_events.zip
Parents
No Data
Reply
  • 24497
    posted

    Hi Erica,

    Thank you for reporting that issue.

    That happened because igGridUpdating internally overrides keydown of igEditor, therefore, custom value of that event within editorOptions was lost. That issue has been fixed and update will be available within service releases.

Children
No Data