In C# Winforms I try to capture the KeyDown event for the Up-arrow and down-arrow keys. Therefore I did the following:
- set the KeyPreview property of the form to true
- override of the forms 'OnKeyDown' method
Anyway, the method is never called for the up-/ down-keys, although it is called for the left-/ right-arrow-keys for example. Then I tried to override the forms 'OnKeyUp' method too, just for testing. The strange thing is now that the 'OnKeyUp' method is called for the up-/ down-arrows too. I also tried to override 'ProcessCmdKey', with the same result: it is not called for the up-/ down-arrows.
The thing why I can't use the KeyUp event is that I need to realize if the keys keep pressed for a time so I need the event to get called multiple times which isn't the case for KeyUp.
Any suggestions on what could be the problem here?