dhtmlxgrid: disable ctrl + any button


i am able to check if ctrl button,alt button or any button is pressed but i cant seem to find a way to differentiate when ctrl + any key or alt + any key is pressed. for example i press ctrl + c, the keycode return onKeyPress event is the same as when ‘c’ is pressed.

the problem is that in my dhtmlgrid i have a function when a cell is on edit…

i have an i use setOnEditCellHandler, the problem is normally when ctrl or alt is pressed nothing happens…i disbled them to enter edit mode.but when ctrl + c or any key for this matter the cell is opened for edit but the setOnEditCellHandler event handler cant seem to detect that it entered edit mode via ctrl + any key, this causes the function inside my event handler not to work.

i hope you shed some light to this.

thanks in advance…

onKeyPress event provides 4 parameters
- key code
- state of ctrl key
- state of shift key
- native event object

you can use second parameter to check state of ctrl-key. If it is not enough - you can poll event object for any additional information.