Key press/release timing

Asked by tpf80

First off, thanks for the wonderful program. It was exactly what I was looking for and works great for my N52 (and im possibly mapping my g15 keys.

Now the question:

Am I able to do something like:

Press and hold CTRL, wait for .5 seconds and while CTRL is still held down, press "1", then release "1", and wait .5 seconds more before releasing CTRL.

I tried the option of mapping a key to press CTRL and 1 together, but this will not work, as the program somehow will not read the "1" keystroke if it is pressed too soon after starting to hold CTRL down.

Question information

Language:
English Edit question
Status:
Solved
For:
Pystromo Edit question
Assignee:
No assignee Edit question
Solved by:
Raumkraut
Solved:
Last query:
Last reply:
Revision history for this message
Best Raumkraut (raumkraut) said :
#1

Yes indeed!
What you need to do is to explicitly specify a value for the CTRL key whenever you need its state to change, just as you would for relative or absolute outputs. For simple keypresses, all you should need are the values 0 (unpressed) and 1 (pressed).
Thusly:
KEY_ANY: KEY_LEFTCTRL@1, 500, KEY_1, 500, KEY_LEFTCTRL@0

Revision history for this message
tpf80 (tpf80) said :
#2

You are awesome! thank you :) now my N-52 does exactly what I want it to in linux.

Revision history for this message
tpf80 (tpf80) said :
#3

Thanks Raumkraut, that solved my question.