Hello Georg,
I have understood, that your implementation works with press and release events. What is not working are the hold events. The hold event in fact depends on the keyboard sending repetition events. When the user presses and holds a key, your keboard (or keyborad driver) should send periodically the 'PRESS' event. In other words, when the user presses and holds the key, following sequence of CoreRoot__DriveKeyboardHitting() invocations should be performed:
1. The user presses the key (will be interpreted as initial 'press' event):
CoreRoot__DriveKeyboardHitting(rootObject, key, 0, 1);
2. The user still holds the key. (will be interpreted as repetition or 'hold' event):
CoreRoot__DriveKeyboardHitting(rootObject, key, 0, 1);
CoreRoot__DriveKeyboardHitting(rootObject, key, 0, 1);
[...]
CoreRoot__DriveKeyboardHitting(rootObject, key, 0, 1);
3. The user releases the key. (will be interpreted as 'release' event):
CoreRoot__DriveKeyboardHitting(rootObject, key, 0, 0);
If in your device the keyboard or (hardware buttons) do not send the repetition events, my suggestion would be to simulate it with your own timer.
Does it help you?
Best regards
Paul Banach