After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166552 - gok RFE - autodetect input devices
gok RFE - autodetect input devices
Status: RESOLVED FIXED
Product: gok
Classification: Deprecated
Component: settings
unspecified
Other All
: Normal enhancement
: ---
Assigned To: bill.haneman
bill.haneman
AP2
Depends on:
Blocks:
 
 
Reported: 2005-02-07 12:30 UTC by bill.haneman
Modified: 2005-02-11 16:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial proposed patch, adds the message strings. (7.88 KB, patch)
2005-02-07 17:59 UTC, bill.haneman
accepted-commit_now Details | Review
fuller version of the patch, which includes most of the necessary code. (20.68 KB, patch)
2005-02-07 22:18 UTC, bill.haneman
committed Details | Review
working patch which implements autodetection. (33.43 KB, patch)
2005-02-09 23:57 UTC, bill.haneman
none Details | Review
tested version of the patch which implements both features (36.71 KB, patch)
2005-02-10 12:33 UTC, bill.haneman
accepted-commit_now Details | Review

Description bill.haneman 2005-02-07 12:30:15 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).
Comment 1 bill.haneman 2005-02-07 17:59:32 UTC
Created attachment 37116 [details] [review]
initial proposed patch, adds the message strings.
Comment 2 David Bolter 2005-02-07 19:01:51 UTC
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.
Comment 3 bill.haneman 2005-02-07 22:18:07 UTC
Created attachment 37137 [details] [review]
fuller version of the patch, which includes most of the necessary code.
Comment 4 David Bolter 2005-02-08 14:11:11 UTC
Bill, your patch includes the changes to mouse.kbd.in (in gok head)... Are you
working from a different branch?
Comment 5 bill.haneman 2005-02-09 23:57:11 UTC
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.
Comment 6 bill.haneman 2005-02-09 23:58:56 UTC
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 ())
{
...
Comment 7 bill.haneman 2005-02-10 12:33:57 UTC
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.
Comment 8 bill.haneman 2005-02-10 12:35:57 UTC
(please ignore irrelevant changes to directed.xam in the above patch, they seem
to result from a different version of intltool on my system.)
Comment 9 David Bolter 2005-02-10 13:14:54 UTC
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.
Comment 10 bill.haneman 2005-02-10 13:41:58 UTC
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 11 David Bolter 2005-02-11 16:27:02 UTC
Comment on attachment 37282 [details] [review]
tested version of the patch which implements both features

Please commit as per our chat.