>> I am overriding the processcmdkey function using the code bellow, and
>> it works, but not for ALL the multi key combo's i present above.
>
>Why not? What happens? What did you expect to happen instead?
Pressing A, D, E, F, T, and C keys on thier own works fine
Capslock and A, D, E, F, T, and C works fine
Shift and A, D, E, F, T, and C does not work
Control and A, D, E, F, T, and C does not work
Alt and A, D, E, F, T, and C does not work
(I have now decided i do want the alt key combo to also work)
So any idea how i can get mod the code to make it pick up all those
modifier and key press combo in addition to just pressing the relevant
letter ?
I want all those combos to execute the same code as the single
keypress
Any advice appreciated
thanks
Peted
Steve Gerrard - 07 Apr 2008 03:27 GMT
> Control and A, D, E, F, T, and C does not work
To capture Ctrl A separately, you would need
switch (keyData)
{
case (Keys.A | Keys.Control):
Keys combines the keys being pressed.
Peter Duniho - 07 Apr 2008 03:57 GMT
> [...]
> So any idea how i can get mod the code to make it pick up all those
> modifier and key press combo in addition to just pressing the relevant
> letter ?
Instead of "switch (keyData)" use "switch (keyData & Keys.KeyCode)". That
will filter out the modifier keys, leaving only the actual key pressed.
If you decide later that you want some modifier keys but not others, there
are a variety of ways you can check for that, but they all involve similar
techniques. That is, using the various mask constants in the Keys
enumeration to check specifically for modifiers.
Pete
Peted - 07 Apr 2008 04:38 GMT
Great, thanks heaps dude
Peted
>> [...]
>> So any idea how i can get mod the code to make it pick up all those
[quoted text clipped - 10 lines]
>
>Pete