I'm having a problem with my keyboard detection and couldn't find the answer in the docu or older threads (most questions regarding this topic go way back and work with an array, what I really don't want to do, since the api seems to provide everything neccessary).
What I'm trying to do are simple combinations with the special keys ctrl, alt and shift. Now the event structure for a keyboard event already contains boolean values for Ctrl and Shift, which brings me to my first question: where is the Alt-boolean ..? (ie. how are combinations like alt-p implemented..?)
My current code then looks like this:
Code: Select all
if( event.KeyInput.Char == 'v' && event.KeyInput.PressedDown == false ){
..do stuff..
}
Code: Select all
if( event.KeyInput.Char == 'v' && event.KeyInput.PressedDown == false && event.KeyInput.Control){
..do stuff..
}
So, I took the first version again without the Ctrl-check and tried Ctrl-v: nothing happened.
Just pressing v works fine, but all combinations with Ctrl, Alt or Shift did not work, even without actually checking any of the corresponding boolean values ..
What am I overlooking ..?