Console keyboard events and accessibility
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: 2007-08-13 23:56:42
Attachments
- patch-kbd-notifier [text/plain] 4158 bytes · preview
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: 2007-08-13 23:56:42
Hi, Some blind people use a kernel engine called Speakup which uses hardware synthesis to speak what gets displayed on the screen. They use the PC keyboard to control this engine (start/stop, accelerate, ...) and also need to get keyboard feedback (to make sure to know what they are typing, the caps lock status, etc.). To tell the truth, the way it's currently done in Speakup is just ugly: it patches the kernel to have it call its own function, and modifies the fn_handler array on the fly to get called when these should have been :o) As patching the kernel is never an easy thing for end users, and since there might be other interesting uses, I wondered whether we could add a notifier list for keyboard events. Attached is a (not-even-compiled!) patch that does this: call the list with a KBD_KEYCODE event, and if anyone returns NOTIFY_STOP, don't go further (key was eaten). Then according to the situation, call the list with a KBD_UNICODE or KBD_KEYSYM event, and if anyone returns NOTIFY_STOP, don't go further. That way, kernel modules may grab some shortcuts for their own uses or monitor key presses. You may wonder why this can't be done at the input layer. The problem is that what people want to monitor is the console keyboard, i.e. all input keyboards that got attached to the console, and with the currently active keymap (i.e. keysyms, not only keycodes). What do people think about this? Samuel