| How can I get the key repetition feature to work using the keyboard queue?

Previous | Input: Keyboard and Link | Next

Q: | Reading directly from the keyboard queue is a good idea, but the key repetition feature does not work...
A: | On the first look, it seems that the key repetition feature really does not work with OSdequeue. But, Marcos Lopez informed me that this is not exactly true. Key repetition feature works even with OSdequeue, but it will not return the keycode itself for the repeated key, but sets an additional bit in the keycode, so value becomes value + 0x800. If you use standard ngetchx function, this additional bit is masked out and your program will get the keycodes it expects. But, it is very simple to mask out this bit manually and make the key repetition feature working even with OSdequeue.