I want to get the time while the key is pressed and the time between two keystrokes.
For example: W key pressed for x sec.(at the next keypress print that time while the key doesn't pressed).
Example 2:
W pressed for 1 sec.
W released
Time between two keystrokes: 10 sec.
W pressed for 0.5 sec
W released