Hi, I am keep playing with events and and keyboard functionality of the grid, I have a question about onKeyPress, I guess I understand how it works, but how does one reconcile the end of the key press?
I am trying to have a key activated, such as [shift] and while the shift is pressed, I would like a user to have an ability to do actionX, once shift is depressed, user should not have an ability to do an actionX.
How would a grid know if a user has stopped pressing a key?
Thank you.
For monitoring status of global keys, it much simplier to use normal DOM events
var shift_state=false;
dhtmlxEvent(document.body,“keydown”,function(e){
if ((e||event).shiftKey) shift_state=true;
});
dhtmlxEvent(document.body,“keyup”,function(e){
if (!(e||event).shiftKey) shift_state=false;
});