Skip to contentSkip to conversation

Keys get stuck

DISCUSSION Bodo Eggert 1 participant 1 message Mar 14, 2008 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 15 lines · Lennart Sorensen
Quoted 6 lines · Pavel Machek

hw is proper place to implement autorepeat, and along with some buffering, it has chance to work. Kernel is not real-time, and X are definitely not real-time, while autorepeat is real-time operation.

It actually mostly works in ps/2 case. Buffer in hardware means that pretty big interrupt delays can be tolerated without problems.

So does the keyboard events generate something like this then:

KEY_x_DOWN
KEY_x_REPEAT
KEY_x_UP

Quoted 5 lines

If so then X certainly could get all the keyboard information I imagine it needs from the kernel, but otherwise I am not sure how it could. A repeated series of key down events are not enough since some keys you don't want repeated you just want to know when the key is held down and when it isn't.

You just need a timestamp for each event, and you can get a timestamp for each event (as far as I read in this thread). Using the current time while processing the event is plain stupid.