Hi,
I am using maverick,
I have tried for the last two days to do something which some X developers
would find quite trivial I imagine. We have a capacitive wheel using the
ad714x.c driver in the kernel. In my latest desperations, I have changed the
events sent by ad714x.c so they are BTN_LEFT and ABS_Y so that it better
matches what a mouse does. I am trying to make this wheel do what a regular
mouse wheel does. OR even better, send a keyboard keycode (one for up, one for
down), which I may do later by hacking the evdev code. But first things first,
why I am not able to get this to work...
The resulting input device looks like this (including a sweep of the finger on
it):
jfdagenais@jfdg3:~$ sudo evtest /dev/input/event7
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x7147 version 0x1
Input device name: "ad714x_captouch_wheel"
Supported events:
Event type 0 (Sync)
Event type 1 (Key)
Event code 272 (LeftBtn)
Event type 3 (Absolute)
Event code 1 (Y)
Value 244
Min 0
Max 1024
Testing ... (interrupt to exit)
Event: time 1320870200.685118, type 1 (Key), code 272 (LeftBtn), value 1
Event: time 1320870200.685122, type 3 (Absolute), code 1 (Y), value 294
Event: time 1320870200.685124, -------------- Report Sync ------------
Event: time 1320870200.720007, type 3 (Absolute), code 1 (Y), value 295
Event: time 1320870200.720009, -------------- Report Sync ------------
Event: time 1320870200.820458, type 3 (Absolute), code 1 (Y), value 296
Event: time 1320870200.820460, -------------- Report Sync ------------
Event: time 1320870200.853917, type 3 (Absolute), code 1 (Y), value 299
Event: time 1320870200.853919, -------------- Report Sync ------------
Event: time 1320870200.887364, type 3 (Absolute), code 1 (Y), value 300
Event: time 1320870200.887366, -------------- Report Sync ------------
Event: time 1320870200.920873, type 3 (Absolute), code 1 (Y), value 303
Event: time 1320870200.920875, -------------- Report Sync ------------
Event: time 1320870200.954413, type 3 (Absolute), code 1 (Y), value 298
Event: time 1320870200.954415, -------------- Report Sync ------------
Event: time 1320870200.968208, type 1 (Key), code 272 (LeftBtn), value 0
Event: time 1320870200.968210, -------------- Report Sync ------------
I have added this to my xorg configs (in /usr/share/X11/xorg.conf.d) so that it
can attach evdev to my device
Section "InputClass"
Identifier "AD7147 Wheel"
MatchProduct "ad714x_captouch_wheel"
Driver "evdev"
Option "Mode" "Relative" #this seems to have no effect
Option "Emulate3Button" "false"
Option "XAxisMapping" "4 5"
Option "EmulateWheel" "true"
Option "EmulateWheelTimeout" "0"
Option "EmulateWheelButton" "1"
EndSection
my efforts to do this through udev were less successful because I had trouble
matching the correct attribute, any hints what udev rule I should use to do
what "MatchProduct "ad714x_captouch_wheel"" does? Will using udev make any
difference?
this out of my Xorg.0.log
[ 1559.326]
X.Org X Server 1.9.0
Release Date: 2010-08-20
[ 1559.327] X Protocol Version 11, Revision 0
[ 1559.327] Build Operating System: Linux 2.6.24-28-server x86_64 Ubuntu
[ 1559.327] Current Operating System: Linux jfdg3 3.1.0-jfdebug-dbg+ #24 SMP
Tue Nov 8 10:53:32 EST 2011 x86_64
[ 1559.327] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.1.0-jfdebug-dbg+
root=UUID=d599661e-3435-408f-a5fb-61112f92a97a ro intel_iommu=igfx_off
[ 1559.327] Build Date: 09 January 2011 12:14:27PM
[ 1559.327] xorg-server 2:1.9.0-0ubuntu7.3 (For technical support please see
http://www.ubuntu.com/support)
[ 1559.327] Current version of pixman: 0.18.4
...
[ 5540.100] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Nov 9 17:16:17
2011
[ 5540.100] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 5540.101] (==) No Layout section. Using the first Screen section.
...
[ 4603.813] (II) config/udev: Adding input device ad714x_captouch_wheel
(/dev/input/event7)
[ 4603.813] (**) ad714x_captouch_wheel: Applying InputClass "AD7147 Wheel"
[ 4603.813] (**) ad714x_captouch_wheel: always reports core events
[ 4603.813] (**) ad714x_captouch_wheel: Device: "/dev/input/event7"
[ 4603.813] (II) ad714x_captouch_wheel: Found 1 mouse buttons
[ 4603.813] (II) ad714x_captouch_wheel: Found absolute axes
[ 4603.813] (II) evdev-grail: failed to open grail, no gesture support
[ 4603.813] (II) ad714x_captouch_wheel: Configuring as mouse
[ 4603.813] (**) Option "EmulateWheel" "true"
[ 4603.813] (**) Option "EmulateWheelButton" "1"
[ 4603.813] (**) Option "EmulateWheelTimeout" "0"
[ 4603.813] (**) ad714x_captouch_wheel: YAxisMapping: buttons 4 and 5
[ 4603.813] (**) Option "XAxisMapping" "4 5"
[ 4603.813] (**) ad714x_captouch_wheel: XAxisMapping: buttons 4 and 5
[ 4603.813] (**) ad714x_captouch_wheel: EmulateWheelButton: 1,
EmulateWheelInertia: 10, EmulateWheelTimeout: 0
[ 4603.813] (II) XINPUT: Adding extended input device "ad714x_captouch_wheel"
(type: MOUSE)
[ 4603.813] (II) ad714x_captouch_wheel: initialized for absolute axes.
here's what I get from xinput list-props:
jfdagenais@jfdg3:~$ xinput list-props ad714x_captouch_wheel
Device 'ad714x_captouch_wheel':
Device Enabled (129): 1
Coordinate Transformation Matrix (131): 1.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (252): 0
Device Accel Constant Deceleration (253): 1.000000
Device Accel Adaptive Deceleration (254): 1.000000
Device Accel Velocity Scaling (255): 10.000000
Evdev Reopen Attempts (249): 10
Evdev Axis Inversion (256): 0, 0
Evdev Axis Calibration (257): <no items>
Evdev Axes Swap (258): 0
Axis Labels (259): "Abs Y" (251)
Button Labels (260): "Button Left" (132), "Button Unknown" (250),
"Button Unknown" (250), "Button Wheel Up" (135), "Button Wheel Down" (136)
Evdev Middle Button Emulation (261): 2
Evdev Middle Button Timeout (262): 50
Evdev Wheel Emulation (263): 1
Evdev Wheel Emulation Axes (264): 4, 5, 4, 5
Evdev Wheel Emulation Inertia (265): 10
Evdev Wheel Emulation Timeout (266): 0
Evdev Wheel Emulation Button (267): 0
Evdev Drag Lock Buttons (268): 0
Even if I have set ABS_Y (labeled Abs Y), when I sweep my finger on the wheel,
the mouse cursor moves left and right, in absolute position. With the
"Emulation Button" set to "0", it is as if I click down, drag left/right, then
release the button. (xev confirms this). When I then set the Emulation button
to "1" (using xinput), then I no longer get clicks while the cursor moves right
or left, nor do I get buttons 4 and 5 for wheel up/down. If I manage to tap the
wheel without moving, I get button down/up events.
So it's kinda like the emulation algo is doing something, but fails to report
the button (4, 5). I have successfully configured the emulation on a real mouse.
Any help or pointers are welcome!
/jfd
Jean-Francois Dagenais
Software Architect - B.Sc.A
Experience the new veo phased array flaw detector at www.sonatestveo.com.
Sonatest AP
2900 chemin des Quatre-Bourgeois
Bureau 305
Quebec City Quebec G1V 1Y4
T| +1 (418) 683 6222 x106 F| +1 (418) 683 7032 M| W| www.sonatest.com
This message (and any associated files) is intended only for the use of
[email protected], [email protected] and may contain information
that is confidential, subject to copyright or constitutes a trade secret. If
you are not the above recipient(s) you are hereby notified that any
dissemination, copying or distribution of this message, or files associated
with this message, is strictly prohibited. If you have received this message in
error, please notify us immediately by replying to the message and deleting it
from your computer. Any views or opinions presented are solely those of the
author and do not necessarily represent those of the company.
Think green - help the environment by not printing this email.
--
Ubuntu-x mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-x