GNOME Bugzilla – Bug 166552
gok RFE - autodetect input devices
Last modified: 2005-02-11 16:30:13 UTC
Start GOK, with input device plugged into the 'wrong' port, misconfigured, or just in the default corepointer mode. It would be nice if GOK detected clicks/dwell motion on all input devices, and offered to use the device which the user has activated, if it does not correspond to the existing GOK configuration. Similarly, instead of just warning about 'core pointer' mode, GOK could and arguably should disconnect the device which the user is actually using, from the core pointer, for the duration of the GOK session. I would propose: * once GOK is running, all XInput events should be listened for (including those from devices which are listed as 'core'). When the first XInput event is received: * GOK should check it against its configured extended Input device specification, and offer to change its setting to match the device actually in use; * if the device is 'CORE', GOK should warn the user that it is disconnecting it from the core pointer (and allow the user to accept this change, or leave the device as-is). A justification for adding this feature now is the fact that there are significant barriers to configuration of XInput devices for GOK on many systems: 1) some systems don't provide any distinction between mouse-like HIDs; 2) some systems only have one 'Mouse' meta-device available, i.e. /dev/input/mice, or multiplex all USB 'Mouse' HIDs; 3) many systems don't reliably assign device numbers to ports, i.e. /dev/mouse1 could move from port to port across reboots; With this feature, all of the above situations could be gracefully handled, though only one mouse HID at a time would be made available via this mechanism. This last limitation is not of practical import at this time, as currently GOK does not actually implement per-action Input device specification (one XInput device is used for all non-core events, currently).
Created attachment 37116 [details] [review] initial proposed patch, adds the message strings.
Comment on attachment 37116 [details] [review] initial proposed patch, adds the message strings. "Conflicts with applications\' use" might be confusing to those who think of GOK as the "application". Perhaps "other applications"? Also I think sperating "\n" into seperate strings is supposed to be good for the translation process. Otherwise it looks great.
Created attachment 37137 [details] [review] fuller version of the patch, which includes most of the necessary code.
Bill, your patch includes the changes to mouse.kbd.in (in gok head)... Are you working from a different branch?
Created attachment 37270 [details] [review] working patch which implements autodetection. this version of the patch also swaps the corepointer, but that functionality is broken; as long as you select 'cancel' from the corepointer-swap dialog instead of 'ok', you are allright, but the corepointer swapping is still flaky.
If desired, the patch can be rendered harmless (i.e. corepointer swapping disabled) by the following change: gok-button.c, line 239: if (0 && gok_input_ext_device_exist ()) { ...
Created attachment 37282 [details] [review] tested version of the patch which implements both features This patch implements both autodetection of extended input (XInput) devices, and corepointer swapping. It restores the core pointer to previous settings on exit.
(please ignore irrelevant changes to directed.xam in the above patch, they seem to result from a different version of intltool on my system.)
Bill I will be able to properly test your patch tomorrow Friday. Is that ok? (I'm off sick today) I could potentially pop into work to grab what I need later today.
David - for reasons of schedule, it would be better to get this patch in today if at all possible. I need to get it integrated into a build today if at all possible, and we'd need to re-dist.
Comment on attachment 37282 [details] [review] tested version of the patch which implements both features Please commit as per our chat.