On Fri, Feb 27, 2009 at 04:33:36PM -0700, Chris Riddoch wrote: > I'm working on some accessibility software that will enter events into > X, and have had some difficulty finding the appropriate APIs to use to > do so. I've looked at some existing software (cellwriter, easystroke, > xvkbd, etc.) and it seems like this is a relatively tricky thing to > do.
XTestFakeInput or create a device through uinput. > I've learned quite a bit about the uinput kernel module, but I haven't > figured out how to determine how it's been mapped to another key > before it gets to the application, or how to get at the mapping from > scancodes to keycodes, or even whether that's where I should be trying > to hook in, in the first place. I have an old copy of O'Reilly's Xlib > programming manual, volume 1, from 1995, but I'm sure things have > moved on since then and there's a preferred way to generate input > events in software in modern X. scancode -> keysym is mostly done in xkb. if you're using uinput, just make sure you post the right keycodes as defined in linux/input.h through the device. Same with XTestFakeInput keycodes, as long as you have the evdev ruleset (xkeyboard-config 1.4 and later) Cheers, Peter _______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
