chromiumos/platform/inputcontrol.git
16 months ago*control: Support for multiple commands per invocation 29/62929/2 factory-pit-4471.B firmware-pit-4482.B master release-R30-4537.B stabilize-4512.B
Andrew de los Reyes [Mon, 22 Jul 2013 20:57:51 +0000 (13:57 -0700)]
*control: Support for multiple commands per invocation

BUG=chromium:259949
TEST=Manually tested:
- single command works
- multiple commands work
- invalid commands rejected, even after valid command
- no args prints usage

Change-Id: I6d5f93b2452d1ab9fb600f21d77f15d7132193df
Reviewed-on: https://gerrit.chromium.org/gerrit/62929
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
17 months agoRevert "Do not store settings in home dir" 76/62176/2 factory-4455.B stabilize-4443.B
Andrew de los Reyes [Tue, 16 Jul 2013 17:57:34 +0000 (10:57 -0700)]
Revert "Do not store settings in home dir"

This reverts commit 2e6f5907fd17b7935c3fce71734eb4f4adff7ee3.

This is needed b/c a corresponding revert in Chrome went in.

BUG=chromium:260776
TEST=Manually tested that mouse settings are applied properly on boot

Change-Id: Iac3f57aac127c0b1625265bc31ee96da856a277a
Reviewed-on: https://gerrit.chromium.org/gerrit/62176
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
17 months agoRevert "Restore udev rule to set input device ownership" 75/62175/2
Andrew de los Reyes [Tue, 16 Jul 2013 17:57:18 +0000 (10:57 -0700)]
Revert "Restore udev rule to set input device ownership"

This reverts commit ceeb062015f5abe27696d86f2f1b74b6c896e0a9.

This is needed b/c a corresponding revert in Chrome went in.

BUG=chromium:260776
TEST=Manually tested that mouse settings are applied properly on boot

Change-Id: Ieb23f14882f10c82336f8dd0cfb984001901c31f
Reviewed-on: https://gerrit.chromium.org/gerrit/62175
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
17 months agomousecontrol: Support for Logitech M-BT96a Pilot Optical Mouse 74/62174/2
Andrew de los Reyes [Tue, 16 Jul 2013 17:55:45 +0000 (10:55 -0700)]
mousecontrol: Support for Logitech M-BT96a Pilot Optical Mouse

This mouse has a low CPI, so we're whitelisting it.

BUG=chromium:260686
TEST=Manually tested w/ mouse

Change-Id: I4d57fe310bf0b1a7bbcf384f24e8d751c3dcea2a
Reviewed-on: https://gerrit.chromium.org/gerrit/62174
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
18 months agoRestore udev rule to set input device ownership 37/58237/3 factory-4290.B factory-pit-4280.B factory-pit-4390.B factory-spring-4262.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-wolf-4389.24.B stabilize-4287.B
Andrew de los Reyes [Tue, 11 Jun 2013 21:56:38 +0000 (14:56 -0700)]
Restore udev rule to set input device ownership

This is needed for non-touchpad/mice devices like the power button.

BUG=chromium:248657
TEST=Power button works (manual test)

Change-Id: I834432c4d92df6bd969e98c11d742ff6b3e65b6f
Reviewed-on: https://gerrit.chromium.org/gerrit/58237
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
18 months agomousecontrol: Speed up older Logitech mice. 28/58128/2
Andrew de los Reyes [Mon, 10 Jun 2013 22:19:20 +0000 (15:19 -0700)]
mousecontrol: Speed up older Logitech mice.

These had lower CPI than more modern mice.

BUG=chromium:248327
TEST=None

Change-Id: I0668e57e5c843de39e9b85c8a9da0d188347de96
Reviewed-on: https://gerrit.chromium.org/gerrit/58128
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>

18 months agoDo not store settings in home dir 42/57642/4
Andrew de los Reyes [Wed, 5 Jun 2013 18:20:33 +0000 (11:20 -0700)]
Do not store settings in home dir

Historically tpcontrol and mousecontrol would store settings in the
home directory. These were needed as sometimes when a new device was
added, Chrome wouldn't call us to configure it, so we would have to
use udev to get notified and apply the properties from disk.

Chrome recently started calling us when new devices are added, so we
can stop using the home directory.

Also, we take advantage of the call to set mouse sensitivity to also
set some other mouse info that chrome doesn't know about (CPI,
device-specific button remapping).

BUG=chromium:221776
TEST=Tested that a plugged mouse gets the proper non-standard CPI
setting when on loging screen, logged in as a user, or logged in as
guest. Tested boot and those two logged in types w/ an
already-connected device, too. In all cases, the mouse performed well.

Change-Id: Ie3babbdcf255d7c307bfb893819a5866ec05f22e
Reviewed-on: https://gerrit.chromium.org/gerrit/57642
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
18 months agocommon: added logitech T400/T620 to touchmouse list 66/55566/3
Dennis Kempin [Fri, 17 May 2013 20:14:10 +0000 (13:14 -0700)]
common: added logitech T400/T620 to touchmouse list

Both devices are not handled by CMT.

BUG=chromium:240850
TEST=manual test with devices.

Change-Id: I7aaf90c926df1fd72df58fc8a47b756fd2d16eaa
Reviewed-on: https://gerrit.chromium.org/gerrit/55566
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Dennis Kempin <denniskempin@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
18 months agomousecontrol: Fix comment 81/57181/2
Andrew de los Reyes [Fri, 31 May 2013 00:23:29 +0000 (17:23 -0700)]
mousecontrol: Fix comment

"Magic Mouse" should be "Mighty Mouse"

BUG=None
TEST=Mice still work

Change-Id: I2ce1ccb92c12cf373238fc7904f222e28738f40c
Reviewed-on: https://gerrit.chromium.org/gerrit/57181
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>

19 months agomousecontrol: Add Microsoft Corp. Trackball Explorer 94/50694/2 factory-4128.B factory-spring-4131.B
Andrew de los Reyes [Thu, 9 May 2013 20:36:01 +0000 (13:36 -0700)]
mousecontrol: Add Microsoft Corp. Trackball Explorer

BUG=chromium:235051
TEST=dominicc@ to test

Change-Id: I6705292ef176c923bc67c17a7c62ef4372e02bb8
Reviewed-on: https://gerrit.chromium.org/gerrit/50694
Reviewed-by: Tai-Hsu Lin <sheckylin@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
19 months agomousecontrol: Add support for a slow external mouse 62/50362/2
Andrew de los Reyes [Tue, 7 May 2013 21:35:46 +0000 (14:35 -0700)]
mousecontrol: Add support for a slow external mouse

BUG=chromium:231740
TEST=manually tested; checked new CPI is correct in software

Change-Id: I15f4224c9b98ddde153e10a93eca4d822253439e
Reviewed-on: https://gerrit.chromium.org/gerrit/50362
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
19 months agomousecontrol: Add anther trackpoint to the whitelist of CPIs 57/49057/2 release-R28-4100.B stabilize-4068.0.B stabilize-4100.38.B stabilize-spring-4100.53.B toolchainB
Andrew de los Reyes [Wed, 24 Apr 2013 16:08:21 +0000 (09:08 -0700)]
mousecontrol: Add anther trackpoint to the whitelist of CPIs

We don't have this keyboard in house, so this is based on a feedback
report.

BUG=chromium:235049
TEST=Will ask user to confirm.

Change-Id: Ie016db1e5dc3e387939fa1a04aaac2cf28611d5c
Reviewed-on: https://gerrit.chromium.org/gerrit/49057
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
19 months agotpcontrol: Wait for logging to (hopefully) have completed 95/48995/2
Andrew de los Reyes [Tue, 23 Apr 2013 16:04:00 +0000 (09:04 -0700)]
tpcontrol: Wait for logging to (hopefully) have completed

I noticed a truncated evdev log in one feedback report, and I realized
that this particular system may have taken longer than 0.5 seconds to
write out the log.

This CL will check the file sizes of the logs and make sure that they
are stable for two consecutive sides of a 0.5s wait. There will thus
be a minimum wait of 0.5s (the previous time), and a max of 6s
(arbitrarily chosen; so it doesn't wait forever).

BUG=chromium:233829
TEST=Manually tested on device

Change-Id: Ib56909a5d25c4a3fb6a52a7fe92588e7b2a0e203
Reviewed-on: https://gerrit.chromium.org/gerrit/48995
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
19 months agomousecontrol: add CPI for HP branded Logitech Optical USB mouse 91/48191/3
Chung-yih Wang [Tue, 16 Apr 2013 02:12:50 +0000 (10:12 +0800)]
mousecontrol: add CPI for HP branded Logitech Optical USB mouse

  Its CPI is close to 580.

BUG=chromium:231740
TEST=Mouse movement scales correctly

Change-Id: Ia695f66dd82c77d345fddd1dfa73cec63cdd2913
Reviewed-on: https://gerrit.chromium.org/gerrit/48191
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Chung-yih Wang <cywang@chromium.org>
Commit-Queue: Chung-yih Wang <cywang@chromium.org>

20 months agoBluetooth Mighty Mouse: Use same seetings as USB version 46/47646/3 stabilize-4008.0.B stabilize-4035.0.B
Andrew de los Reyes [Tue, 9 Apr 2013 15:12:51 +0000 (08:12 -0700)]
Bluetooth Mighty Mouse: Use same seetings as USB version

When we entered the CPI and a hack to disable the side buttons for the
Mighty Mouse, we only used the USB version. With this CL, we apply the
settings to the BT version as well.

BUG=chromium:229423
TEST=Measured the CPI of the BT Mighty Mouse. Also, tested that the
side buttons are disabled with this CL.

Change-Id: Iecdf1bd725f15514f4802f8834f2c964c0b0ee0e
Reviewed-on: https://gerrit.chromium.org/gerrit/47646
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
20 months agogenerate_userfeedback: Support up to 7 touchpad devices 99/46699/2
Andrew de los Reyes [Wed, 27 Mar 2013 22:02:53 +0000 (15:02 -0700)]
generate_userfeedback: Support up to 7 touchpad devices

Historically we uploaded only the 2 most recent log files, regardless
of how many devices were attached. In common practice, this meant the
two most recent log files for the integrated touchpad. Really what we
want today, tho, is just the most recent log file (we assume previous
logs were already uploaded) for each device.

We thus loosen the criteria. We still keep a limit of 7 just as a way
to make sure we don't accidentally upload forever if there's some odd
bug.

BUG=chromium:224438
TEST=manually tested on device

Change-Id: I17eb8e648d8b192acce896abfa211c0a8f0c9b0a
Reviewed-on: https://gerrit.chromium.org/gerrit/46699
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
20 months agotpcontrol: Name zipped log filename with the device name 98/46698/2
Andrew de los Reyes [Wed, 27 Mar 2013 22:01:16 +0000 (15:01 -0700)]
tpcontrol: Name zipped log filename with the device name

Also, cleanup all but the current log files.

BUG=chromium:224438
TEST=Manually tested on device

Change-Id: Id48342d4c16f221259a37797f5850381987f3443
Reviewed-on: https://gerrit.chromium.org/gerrit/46698
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
20 months agoBetter algorithm to find touchpad devices. 90/46590/2
Andrew de los Reyes [Tue, 26 Mar 2013 22:12:18 +0000 (15:12 -0700)]
Better algorithm to find touchpad devices.

We now look for all devices that use the CMT driver.

BUG=chromium:224128
TEST=manually tested on device with external pads

Change-Id: Ie846845fa2122473ea222764eddb7a035c8dddaf
Reviewed-on: https://gerrit.chromium.org/gerrit/46590
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>

20 months agoSupport for some smaller FAVI keyboards 68/46468/2 release-R27-3912.B stabilize-3912.79.B toolchainA
Andrew de los Reyes [Tue, 26 Mar 2013 00:30:15 +0000 (17:30 -0700)]
Support for some smaller FAVI keyboards

BUG=chromium:223793
TEST=Manually tested on device

Change-Id: I7826e532c86c3dcc71fad0c13471d51359b529ef
Reviewed-on: https://gerrit.chromium.org/gerrit/46468
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>

20 months agomousecontrol: Fix Logitech Unifying Receiver CPI 59/46459/3
Andrew de los Reyes [Mon, 25 Mar 2013 23:43:42 +0000 (16:43 -0700)]
mousecontrol: Fix Logitech Unifying Receiver CPI

A new kernel patch went in that makes the unifying receiver expose
devices with their product IDs, as opposed to the ID of the receiver
itself. Thus, we need to change mousecontrol accordingly.

BUG=chromium:223771
TEST=tested on device with K400r keyboard

Change-Id: Iea7c175104525e75a6410d631f104b5b3b9bb72c
Reviewed-on: https://gerrit.chromium.org/gerrit/46459
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>

20 months agomousecontrol: tpcontrol: Set pointer and scroll sensitivity 12/46212/4
Che-Liang Chiou [Fri, 22 Mar 2013 01:54:28 +0000 (18:54 -0700)]
mousecontrol: tpcontrol: Set pointer and scroll sensitivity

As now gestures library distinguishes pointer and scroll sensitivity,
inputcontrol scripts should set them accordingly.

BUG=chromium-os:36322
TEST=Connect Magic Mouse, change mouse and touchpad speed manually, and
     check `xinput watch-props $id` output for Magic Mouse, Magic
     Trackpad, a generic mouse, and the internal touchpad.  Make sure
     that properties are changed correctly.

Change-Id: I7aea4620fc6dc53d9dacc6b9e337737b7873932b
Reviewed-on: https://gerrit.chromium.org/gerrit/46212
Commit-Queue: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
20 months agomousecontrol: tpcontrol: Search Magic Mouse 87/46187/5
Che-Liang Chiou [Thu, 21 Mar 2013 23:59:11 +0000 (16:59 -0700)]
mousecontrol: tpcontrol: Search Magic Mouse

Magic Mouse should be reported as both mouse and touchpad.

BUG=chromium-os:36322
TEST=Connect Magic Mouse (assume its id=10) and check:
       mousecontrol listdev | grep 10
       tpcontrol listdev | grep 10
     Also make sure that all other device are correctly listed with this
     change.

Change-Id: Idbaa82da894673a71fcce118c4765c19c994db86
Reviewed-on: https://gerrit.chromium.org/gerrit/46187
Commit-Queue: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
20 months agomousecontrol: Turn off kernel's Magic Mouse interpreter 86/46186/5
Che-Liang Chiou [Wed, 12 Dec 2012 00:27:26 +0000 (16:27 -0800)]
mousecontrol: Turn off kernel's Magic Mouse interpreter

Kernel's Magic Mouse driver will interpret mouse events by default, and
we would like to turn this interpretation off.

BUG=chromium-os:36323
TEST=On Snow, connect Apple Magic Mouse and run test script below

$ cat /sys/module/hid_magicmouse/parameters/emulate_3button
N
$ cat /sys/module/hid_magicmouse/parameters/emulate_scroll_wheel
N

Change-Id: Ib7d43576e2dceee2f71464f3e5596c8d01cfd2f5
Reviewed-on: https://gerrit.chromium.org/gerrit/46186
Commit-Queue: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
20 months agomousecontrol: Disable X's acceleration profile 85/46185/5
Che-Liang Chiou [Thu, 21 Mar 2013 22:45:39 +0000 (15:45 -0700)]
mousecontrol: Disable X's acceleration profile

As cmt does the acceleration for us now, we disable X's acceleration
profile.

BUG=chromium-os:36322
TEST=Connect a mouse and make sure movement accel still works.

Change-Id: I661a24b2374b0221adad62c9fa3c9e8b407a7a08
Reviewed-on: https://gerrit.chromium.org/gerrit/46185
Commit-Queue: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
20 months agoFix empty block in tpcontrol_xinput 98/46298/2
Charlie Mooney [Fri, 22 Mar 2013 20:00:06 +0000 (13:00 -0700)]
Fix empty block in tpcontrol_xinput

A recent change mad this option obsolete, but you still need to have a
body in each block of the if/elif/else statement or else it will not
parse right.  This just adds a nop into the emptied block.

BUG=chromium:223227
TEST=manually run on a Link

Change-Id: I5af99f55a01ef7ed20ec6c42e6703ce3ae25f46d
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46298
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
Commit-Queue: Charles Mooney <charliemooney@google.com>
Tested-by: Charles Mooney <charliemooney@google.com>
20 months agoAdding a tscontrol script for touchscreen 12/46012/3
Charlie Mooney [Wed, 20 Mar 2013 16:24:33 +0000 (09:24 -0700)]
Adding a tscontrol script for touchscreen

This adds a simple tscontrol script analogous to the tpcontrol script
for getting basic info about the touchscreen.  The touch FW test needs
to have a simple and clean way to grab the device node of the
touchscreen if we want to be able to run it on the touchscreen as well
as the touchpad and this provides that.

Right now it only supports two commands "status" and "listdev" both of
which do what they did for tpcontrol but for the touchscreen.  In the
future more commands can be added as are needed.

BUG=chromium:222247
TEST=gmerged on Link, manually tested and it worked

Change-Id: I3c70c7c3c40b8dddad3362207abe0848a41c1f4b
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46012

21 months agoRemoved 3F click property 19/45919/4
Dennis Kempin [Tue, 19 Mar 2013 23:05:47 +0000 (16:05 -0700)]
Removed 3F click property

3F click is no longer experimental. As the command might still be called
by chrome, it is ignored.

BUG=chromium:221468
TEST=restart ui; 3f click works!

Change-Id: I7c0cb5832d350c519bc9fa66d1943da4740f890f
Reviewed-on: https://gerrit.chromium.org/gerrit/45919
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@chromium.org>
Tested-by: Dennis Kempin <denniskempin@chromium.org>
21 months agomousecontrol: Better mouse movement for Logitech K400r keyboard. 93/44393/2 factory-spring-3842.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B stabilize-3881.0.B
Andrew de los Reyes [Fri, 1 Mar 2013 16:45:03 +0000 (08:45 -0800)]
mousecontrol: Better mouse movement for Logitech K400r keyboard.

BUG=chromium-os:39427
TEST=Manually tested on a device.

Change-Id: I9d11a5a926c2c8a9c828b3d47541648bb8edc336
Reviewed-on: https://gerrit.chromium.org/gerrit/44393
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
22 months agotpcontrol: Support for multiple touchpads 33/42933/4 release-R26-3701.B stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-bluetooth-smart toolchain-3701.42.B
Andrew de los Reyes [Fri, 8 Feb 2013 19:11:27 +0000 (11:11 -0800)]
tpcontrol: Support for multiple touchpads

Historically we only supported a single touchpad, but now with the
Magic Trackpad, people can have multiple.

With this change, we consistently apply properties on multiple
pads. We also discover them correctly in the presense of an existing
pad.

BUG=chromium-os:38494
TEST=Made sure mice and integrated touchpads still got discovered and
had the proper properties applied. Saw that when adding Magic
Trackpad, only that was discovered and proper properties were set on
it. Turned on/off tap-to-click and saw it apply to both Magic Trackpad
and the integrated pad. Also tested input metrics with: sh -x
/opt/google/touchpad/send_input_metrics

Change-Id: I20261bd820ec3a67e4e63012b11cc0ef3deb1ad8
Reviewed-on: https://gerrit.chromium.org/gerrit/42933
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
22 months agomousecontrol: M570 mouse was too fast 60/42460/2
Andrew de los Reyes [Fri, 1 Feb 2013 17:57:48 +0000 (09:57 -0800)]
mousecontrol: M570 mouse was too fast

mukai@ complained that the M570 was too fast in R26. I met with him
and agreed, so we're slowing it down a bit.

BUG=chromium-os:38426
TEST=Manual test with mukai@

Change-Id: If7c718275053933839c77379efaa7ea95aca278d
Reviewed-on: https://gerrit.chromium.org/gerrit/42460
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
22 months agomousecontrol: Magic Mouse: Enable scroll wheel emulation and 3f click 51/42251/2 stabilize-3658.0.0
Andrew de los Reyes [Tue, 29 Jan 2013 22:21:25 +0000 (14:21 -0800)]
mousecontrol: Magic Mouse: Enable scroll wheel emulation and 3f click

These were disabled as part of the work to move how the Magic Mouse is
handled, but it broke the existing Magic Mouse code path.

BUG=chromium-os:38330
TEST=manual test that Magic Mouse works as expected

Change-Id: Ice6591fa92816eba35900a4d5dd6e03774d74f4e
Reviewed-on: https://gerrit.chromium.org/gerrit/42251
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>

23 months agomousecontrol: better calibration for Logitech M570 trackball 52/40352/2 factory-3536.B
Andrew de los Reyes [Thu, 3 Jan 2013 00:56:40 +0000 (16:56 -0800)]
mousecontrol: better calibration for Logitech M570 trackball

BUG=chromium-os:37586
TEST=tested with M570 and older, calibrated trackball on a system, saw
they performed similarly w/ this change, but way different w/o it.

Change-Id: Ie7d69d0392f7a382fd362276bf2c792597f3e9f4
Reviewed-on: https://gerrit.chromium.org/gerrit/40352
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
23 months agoAdd touch_noise_feedback to gather touch noise related feedback 87/40087/2
Yufeng Shen [Fri, 21 Dec 2012 18:54:33 +0000 (13:54 -0500)]
Add touch_noise_feedback to gather touch noise related feedback

We have a daemon touch_noise_monitor that monitors touch noise
and dumps related logs to /var/log/touch_noise.log.
This patch adds the touch_noise.log to feedback report.

BUG=chrome-os-partner:16788
TEST=Make fake /var/log/touch_noise.log
     Run touch_noise_feedback and note that uuencoded file
     appear at stdout.

Change-Id: Ic3611428d78d3de1aac0acd856f7d8c3dc4de7cb
Reviewed-on: https://gerrit.chromium.org/gerrit/40087
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
2 years agotpcontrol_xinput : add support for trial firmware swapping. 43/39843/3
Benson Leung [Tue, 18 Dec 2012 02:56:43 +0000 (18:56 -0800)]
tpcontrol_xinput : add support for trial firmware swapping.

Allow the user to swap trial firmwares on Snow starting with
chromeos-touch-firmware-daisy-2.4-r2.tbz2.

Changing firmware happens on the next boot, when the firmware
updater is normally run again to check if something
has changed.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:37150,chromium-os:36911
TEST=/opt/google/touchpad/tpcontrol firmware OR from crosh
tpcontrol firmware
Check that the following is printed:
[cyapa.bin] cyapa.bin-trial1 cyapa.bin-trial2 cyapa.bin-trial3

Select one of the firmwares by doing:
tpcontrol firmware cyapa.bin-trial1
Check that this message is printed:
Selected cyapa.bin-trial1 as touchpad trial firmware. Reboot to apply.
cat /var/cache/touch_trial/selection
Check that it is cyapa.bin-trial1
Reboot the system.
Check that the active firmware is 2.7 now, instead of 2.4.

Change-Id: Iacacb46612b768573342f3a45e65d85224cea9cb
Reviewed-on: https://gerrit.chromium.org/gerrit/39843
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
2 years agotpcontrol: support for tap_dragging preference. 36/39736/2
Andrew de los Reyes [Wed, 12 Dec 2012 00:44:28 +0000 (16:44 -0800)]
tpcontrol: support for tap_dragging preference.

This is a new accessibility preference

BUG=chromium-os:35609
TEST=tested on Link device, both twiddling the preference and
sleep/wake while it was set to on.

Change-Id: I0e60d52ed4cdc4e1786985652847d28a975e088a
Reviewed-on: https://gerrit.chromium.org/gerrit/39736
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2 years agomousecontrol: Turn off mouse event interpretation in kernel 72/39572/3
Che-Liang Chiou [Wed, 12 Dec 2012 00:27:26 +0000 (16:27 -0800)]
mousecontrol: Turn off mouse event interpretation in kernel

Kernel's Apple Magic Mouse driver will try to interpret mouse events,
and we would like to turn this interpretation off.

This change also fixes vendor_product_for_xinput_id, which falsely
assumes that vendor ID and product ID are listed in "Device Product ID".
The vendor ID is actually listed in "Device Vendor ID" field on Snow.

BUG=chromium-os:36323
TEST=On Snow, connect Apple Magic Mouse and run test script below

$ cat /sys/module/hid_magicmouse/parameters/emulate_3button
N
$ cat /sys/module/hid_magicmouse/parameters/emulate_scroll_wheel
N

Change-Id: I3a72385390b43642ab1e0d6dc88b2bc9e8cc0cb4
Reviewed-on: https://gerrit.chromium.org/gerrit/39572
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>

2 years agomousecontrol: Add CPI for Logitech Optical Wheel Mouse model M-UAE96 28/38928/2 stabilize2
Che-Liang Chiou [Thu, 29 Nov 2012 19:27:43 +0000 (11:27 -0800)]
mousecontrol: Add CPI for Logitech Optical Wheel Mouse model M-UAE96

Our test shows that its CPI should actually be close to 530.

BUG=chromium-os:36319
TEST=Mouse movement on Snow scales correctly

Change-Id: I523ae5b0f11da913eb7fb196c8f7ed885e8334ba
Reviewed-on: https://gerrit.chromium.org/gerrit/38928
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>

2 years agoAdd udev rule for event* input devices 51/38851/2
John Sheu [Wed, 28 Nov 2012 07:05:14 +0000 (23:05 -0800)]
Add udev rule for event* input devices

Setup these devices in /dev/input/*, and set to group owner "input".
These rules are copied here from adhd since they logically belong here.

Doing this towards the nonroot-X effort.

TEST=build, run on snow
BUG=chromium-os:388

Change-Id: I8be4dd02cdb7020bb3da14df86979d85c142968b
Reviewed-on: https://gerrit.chromium.org/gerrit/38851
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: John Sheu <sheu@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
2 years agotpcontrol_xinput: rename three_finger_swipe_enable to three_finger_swipe.
Andrew de los Reyes [Thu, 25 Oct 2012 20:23:09 +0000 (13:23 -0700)]
tpcontrol_xinput: rename three_finger_swipe_enable to three_finger_swipe.

BUG=chromium-os:35735
TEST=Tested on device

Change-Id: I8a2922a082ad3c88d2161eada869bc346d8813b7
Reviewed-on: https://gerrit.chromium.org/gerrit/36584
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2 years agotpcontrol: Pref to enable/disable 3f swipe.
Andrew de los Reyes [Thu, 25 Oct 2012 00:23:01 +0000 (17:23 -0700)]
tpcontrol: Pref to enable/disable 3f swipe.

BUG=chromium-os:35705
TEST=used command-line to turn on/off 3f swipe

Change-Id: I35313b7decf5dcd06a3ea9dbdca898ac239987bb
Reviewed-on: https://gerrit.chromium.org/gerrit/36509
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2 years agoAdd touchscreen_feedback tool for generating touchscreen logs factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B firmware-butterfly-2788.B firmware-stout-2817.B stabilize stabilize-daisy stabilize-link
Michael Spang [Mon, 13 Aug 2012 19:15:42 +0000 (15:15 -0400)]
Add touchscreen_feedback tool for generating touchscreen logs

This adds a script similar to "tpcontrol log" to generate logs of
touchscreen input events.

BUG=chrome-os-partner:11604
TEST=run feedback on link, verified logs present

Change-Id: I5e2661f15a8004bd8336d83219f8387868ea0664
Reviewed-on: https://gerrit.chromium.org/gerrit/30015
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: Michael Spang <spang@chromium.org>
Tested-by: Michael Spang <spang@chromium.org>
2 years agomousecontrol: Support for Lenovo N5901, N5902 mouse speeds factory-2717.B factory-2723.14.B firmware-link-2695.2.B firmware-link-2695.B firmware-snow-2695.90.B firmware-snow-2695.B release-R22-2723.B
Andrew de los Reyes [Fri, 27 Jul 2012 21:36:22 +0000 (14:36 -0700)]
mousecontrol: Support for Lenovo N5901, N5902 mouse speeds

These are two multimedia keyboards. I only have an N5902, so I'm
guessing on the N5901. This CL makes it faster; it feels nice.

BUG=chromium-os:33039
TEST=tested with N5902; pointing speed is better

Change-Id: I82629ceb0db12d9736515603174ff42b8eec810b
Reviewed-on: https://gerrit.chromium.org/gerrit/28624
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2 years agomousecontrol: support for FAVI Entertainment Wireless Keyboard (TouchPad) firmware-parrot-2685.B
Andrew de los Reyes [Wed, 25 Jul 2012 23:31:10 +0000 (16:31 -0700)]
mousecontrol: support for FAVI Entertainment Wireless Keyboard (TouchPad)

BUG=chromium-os:32965
TEST=tested with said touchpad

Change-Id: I1a73b29b4c718695f7705268e0898b6683f3005f
Reviewed-on: https://gerrit.chromium.org/gerrit/28443
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2 years agomousecontrol: Support for IBM Trackpoint
Andrew de los Reyes [Tue, 24 Jul 2012 21:01:29 +0000 (14:01 -0700)]
mousecontrol: Support for IBM Trackpoint

Both PS/2 and USB

BUG=chromium-os:32904
TEST=tested on device

Change-Id: Ibf0ff0cdbc535193f3c62620f7f37f0497a40552
Reviewed-on: https://gerrit.chromium.org/gerrit/28309
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2 years agoinputcontrol: Special case Logitech M-BT58 mouse 05/27205/1
Andrew de los Reyes [Wed, 11 Jul 2012 21:49:04 +0000 (14:49 -0700)]
inputcontrol: Special case Logitech M-BT58 mouse

BUG=chromium-os:32496
TEST=tested on device

Change-Id: I197b45376bdbd3ce6cc466c565726fba542f071e

2 years ago[inputcontrol] unbreak tap-to-click 61/26961/1
Elly Jones [Mon, 9 Jul 2012 19:01:36 +0000 (15:01 -0400)]
[inputcontrol] unbreak tap-to-click

Fix an operator-precedence bug causing every command implemented after 'log' to
be disabled.

TEST=Adhoc
BUG=None

Change-Id: Iec4ed81a49f8c821b8efad3dabd8bf51f1c03732
Signed-off-by: Elly Jones <ellyjones@chromium.org>
2 years ago[inputcontrol] support alternate log dir 54/26454/2 factory-2569.B
Elly Jones [Fri, 29 Jun 2012 17:22:46 +0000 (13:22 -0400)]
[inputcontrol] support alternate log dir

When run as the debug daemon, this script cannot write to the user's homedir, so
support logging to the debug daemon's tmpfs as well.

BUG=chromium-os:30740
TEST=Adhoc
mkdir /debugd/touchpad ; /opt/google/touchpad/tpcontrol log alt ; \
    ls /debugd/touchpad

Change-Id: I2981602158eab67df55644826879133f62e76922
Signed-off-by: Elly Jones <ellyjones@chromium.org>
2 years agomousecontrol: Unquote * so it can glob. 31/24631/2 factory-2460.B factory-2475.B
Andrew de los Reyes [Wed, 6 Jun 2012 18:30:38 +0000 (11:30 -0700)]
mousecontrol: Unquote * so it can glob.

BUG=chromium-os:31599
TEST=tested non-whitelisted Logitech Wireless device. Saw errors stop
with this CL.

Change-Id: I590d9e0e384f3435673804d60c7f5ed9771c2941

2 years agomousecontrol: Disable side-button on Apple Mighty Mouse 30/24630/2
Andrew de los Reyes [Wed, 6 Jun 2012 18:19:31 +0000 (11:19 -0700)]
mousecontrol: Disable side-button on Apple Mighty Mouse

Some users trigger the side button by mistake, which currently
triggers the page-back action, and it particularly easy to do by
mistake on this mouse.

With this CL, we look for a mouse with the given vendor/product ID and
remap buttons accordingly.

BUG=chromium-os:31529
TEST=tested with this mouse and others on a Lumpy.

Change-Id: I13447cc7c3181d6040032920d37b2a611a7b7356

2 years agomousecontrol: Add some more trackballs 40/24540/2
Andrew de los Reyes [Tue, 5 Jun 2012 20:50:09 +0000 (13:50 -0700)]
mousecontrol: Add some more trackballs

Adding some more trackballs based on a feedback report and browsing
http://www.linux-usb.org/usb-ids.html for items that look like
trackballs.

BUG=chromium-os:31550
TEST=Made sure mousecontrol still ran w/ mice I have (not these new ones)

Change-Id: Ia101901c5e7da00a8215f8cdc0dbf73da61d161a

2 years agoadded listdev command to tpcontrol_xinput 92/23692/1 factory-2368.B factory-2394.B
Dennis Kempin [Fri, 25 May 2012 20:04:01 +0000 (13:04 -0700)]
added listdev command to tpcontrol_xinput

the new command will print the device id of the internal trackpad
as provided by find_pad.

BUG=chromium-os:31150
TEST=manual testing on lumpy

Change-Id: I2100bbce8d7cce3f368fbf88fa66bc9a149549ba

2 years agomousecontrol: Calibration data for two more mice. 63/21763/1 factory-2268.16.B factory-2305.B factory-2338.B firmware-link-2348.B release-R20-2268.B
Andrew de los Reyes [Thu, 3 May 2012 16:09:26 +0000 (09:09 -0700)]
mousecontrol: Calibration data for two more mice.

This CL adds support for a basic Dell wheel mouse and for the Razer
DeathAddr gaming mouse.

BUG=chromium-os:30468
TEST=tested each mouse on device w/ these changes to see standard
speed.

Change-Id: I233013861a3a80964f9b404a24a8aa87db354beb

2 years agoinput_metrics: modify the start on conditions 57/21457/3
Joseph Hwang [Mon, 30 Apr 2012 09:43:11 +0000 (17:43 +0800)]
input_metrics: modify the start on conditions

Simplify the start on condition. The started metrics_daemon has
implied started ui. With the started ui, we could use xinput to
query the trackpad device list.

BUG=chromium-os:28644
TEST=Reboot the system. Type "about:histograms" in Chrome omnibox.
About 1 minute later, find the histogram of "Touchpad.Device" in the
page.

Change-Id: I821d2b215a94a9260d4a3e4cf8afa6efbe6baf0c

2 years agomousecontrol: Special case another Logitech USB Mouse 11/21111/1
Andrew de los Reyes [Wed, 25 Apr 2012 20:19:40 +0000 (13:19 -0700)]
mousecontrol: Special case another Logitech USB Mouse

BUG=chromium-os:30001
TEST=None

Change-Id: I5fb76c7d9a6eaa3558c3872b5661ec43e7721a2d

2 years agotpcontrol: support for new middle click flags 86/20986/2
Andrew de los Reyes [Tue, 24 Apr 2012 21:50:24 +0000 (14:50 -0700)]
tpcontrol: support for new middle click flags

There are two new flags for middle click that will be accessible via
Chrome, so we expose them here.

Also, some refactoring to avoid duplicated code.

BUG=chromium-os:18898
TEST=tested on device

Change-Id: Idc4fc17fb932c5f50041428b8552d4c479fce2ac

2 years agomousecontrol: add CPI for Apple USB optical mouse and BT Magicmouse 01/20801/2
Daniel Kurtz [Mon, 23 Apr 2012 02:03:33 +0000 (10:03 +0800)]
mousecontrol: add CPI for Apple USB optical mouse and BT Magicmouse

CPI measured using a ruler to by moving the mouse 10 inches in X and Y,
and summing Rel X, Y events captured by evemu-record:

$ evemu-record /dev/input/event9 > /tmp/events
$ grep "0002 0000" /tmp/events | awk '{ sum_x += $5 } END { print sum_x }'
$ grep "0002 0001" /tmp/events | awk '{ sum_y += $5 } END { print sum_y }'

"Mitsumi Electric Apple Optical Mouse" (USB: 05AC:0304)
 CPI in x & y ~= 400
"Apple "BLUETOOTH HID v0.84 Mouse" (BT magicmouse) (USB: 05AC:030D)
 CPI in x & y ~= 1780

BUG=chromium-os:27996
TEST=On BT enabled chromenook, connect to Apple BT magicmouse
 Adjust "Mouse speed" slider from 1 to 5
 Pointer speed should increase monotonically.
 At each setting, pointer speed should be roughly the same as other mice.
 Repeat for Apple USB Optical mouse.

Change-Id: Icd0acd689b052ed4a7ab3b0a43203e1fa6f534ce

2 years agoSend input metrics to Chrome 79/19879/5
Joseph Hwang [Mon, 9 Apr 2012 10:40:08 +0000 (18:40 +0800)]
Send input metrics to Chrome

This CL reports metrics regarding the existence of trackpad device
to Chrome. An upstart script is triggered after every boot to probe the
trackpad device, and sends its state to Chrome through metrics_client
utility.

BUG=chromium-os:28644
TEST=Reboot the system. Type "about:histograms" in Chrome omnibox.
About 1 minute later, find the histogram of "Touchpad.Device" in the
page.

Change-Id: Ifbb22ddb3849a4f81c6a43b05f13a30c3cb60c9b

2 years agoInclude cmt_input_events logs in userfeedback 73/19973/4
Chung-yih Wang [Wed, 11 Apr 2012 08:01:17 +0000 (16:01 +0800)]
Include cmt_input_events logs in userfeedback

BUG=chrome-os-partner:8695
TEST=test on device, use '/opt/google/touchpad/tpcontrol log' and see if
  cmt_input_events* log will reside in the same directory as touchpad_activity*.

Change-Id: I6029da41a3037ece92f240babe7397945bf5bec1

2 years agoFix sensitivity multiplier table 85/19885/2
Daniel Kurtz [Wed, 11 Apr 2012 02:07:08 +0000 (10:07 +0800)]
Fix sensitivity multiplier table

BUG=chromium-os:29260
TEST=Attach USB mouse.
TEST=Set mouse to sensitivity 2
  /opt/google/mouse/mousecontrol sensitivity 2
TEST=Set mouse to sensitivity 4, mouse should be a bit faster.
  /opt/google/mouse/mousecontrol sensitivity 4

Change-Id: I269134e983a5642dd310eec9af01b512e3ffdd97

2 years agomousecontrol: Support for Logitech Unifying Receiver 76/19676/3
Andrew de los Reyes [Thu, 5 Apr 2012 17:23:49 +0000 (10:23 -0700)]
mousecontrol: Support for Logitech Unifying Receiver

Historically we always set mice attached through the unifying receiver
to 1000 CPI (the default). The Logitech K400 keyboard which attached
touchpad currently feels way too slow. Ideally we would use our
touchpad stack, but in the mean time, we continue to treat it as a
mouse with low CPI.

This CL adds support for the Logitech Unifying Reciever and the K400
touchpad.

BUG=chromium-os:29010
TEST=tested with multiple Logitech Unifying Receiver devices,
including K400 touchpad.

Change-Id: I684b48101fd11bf24e074d7f19ad533f0f66805e

2 years agomousecontrol: Set CPI when refreshing mice settings. 06/19706/2
Andrew de los Reyes [Fri, 6 Apr 2012 00:50:06 +0000 (17:50 -0700)]
mousecontrol: Set CPI when refreshing mice settings.

This is necessary to set CPI after a user logs out.

BUG=chromium-os:29051
TEST=tested on device

Change-Id: Ia1faf260e258905b38c437bada3e5400ff589f62

2 years agomousecontrol: Add support for HP branded "Logitech, Inc. Optical Wheel Mouse" 75/19675/1
Andrew de los Reyes [Thu, 5 Apr 2012 16:34:06 +0000 (09:34 -0700)]
mousecontrol: Add support for HP branded "Logitech, Inc. Optical Wheel Mouse"

BUG=chromium-os:29009
TEST=tested with this specific mouse

Change-Id: Ie984226cff2587980b795483d015be5b73aaa0c3

2 years agoCorrect inputcontrol udev rule to trigger on !="remove" 62/18662/1
Daniel Kurtz [Wed, 21 Mar 2012 16:14:54 +0000 (00:14 +0800)]
Correct inputcontrol udev rule to trigger on !="remove"

Rule of thumb for udev rules:
ACTION!="remove" = my rule should be run for this device
ACTION=="add" = my rule should not be run if there's a chance another
  daemon or rule has already been run for this device

In this case, we want to make sure the rule always runs for these devices.

BUG=chromium-os:27064
TEST=1) plug in USB mouse at runtime, notice the following dmesg:
  logger: /opt/google/mouse/mouse_added
     2) plug in USB and reboot, notice the following in dmesg after boot:
  logger: /opt/google/mouse/mouse_added
  logger: /opt/google/mouse/touchpad_added

Change-Id: Iebdd0fe69086768eddde95619a565b433a68add0

2 years agoInstall udev rule into /lib instead of /etc 21/18121/3 factory-1987.B
Daniel Kurtz [Wed, 14 Mar 2012 13:59:34 +0000 (21:59 +0800)]
Install udev rule into /lib instead of /etc

While we are at it, combine mouse and touchpad rules into a single
inputcontrol udev rule.
Note that this fixes the broken Makefile install target dependency.

BUG=chromium-os:27064
TEST=emerge-${B} inputcontrol
   should install /lib/udev/rules.d/99-inputcontrol.rules
   should not install anything to /etc/udev/rules.d/

Change-Id: Id456b07e1a1f3ae7da08454375ffff0a525864e0

2 years agoLog all calls to inputcontrol scripts to /var/log/messages 20/18120/3
Daniel Kurtz [Wed, 14 Mar 2012 18:15:52 +0000 (02:15 +0800)]
Log all calls to inputcontrol scripts to /var/log/messages

The inputcontrol scripts are a potential source of incorrectly configured
input devices.  Therefore, it is useful to know how and when they are
being called.

Since they are theoretically called very infrequently, the log spew will
be minimal.

BUG=chrome-os-partner:7334
TEST=On device, for example:
  $ tail -F /var/log/messages
  $ /opt/google/touchpad/tpcontrol status
 => <timestamp> localhost logger: /opt/google/touchpad/tpcontrol status

Change-Id: If9ca97cee42c39664a41aeb520445295c09d5dbc

2 years agoCheck ID_INPUT_MOUSE in udev mouse rule 19/18119/2
Daniel Kurtz [Wed, 14 Mar 2012 13:58:52 +0000 (21:58 +0800)]
Check ID_INPUT_MOUSE in udev mouse rule

There is no "ID_CLASS" ENV var for input devices...
except for the one that is created by this rule since it does '=' instead
of '=='.

Fix both of these problems by checking for ID_INPUT_MOUSE.

BUG=chromium-os:27064
TEST=Plug USB mouse.
     Notice that mouse_added gets called only for mice, not for touchpads
     or other input devices.

Change-Id: Iceeb9227359160d063a1aa077b9b4933e025a163

2 years agomousecontrol: cleanup find_mice 18/18118/2
Daniel Kurtz [Wed, 14 Mar 2012 08:49:14 +0000 (16:49 +0800)]
mousecontrol: cleanup find_mice

Small documentation changes.

BUG=none
TEST=all real mice still displayed in mousecontrol status

Change-Id: I2949d6065fdea6e43885d6f64698683a036d10f3

2 years agoUse $DEVNODE and "Device Node" instead of $DEVPATH and "Evdev Physical" 97/17997/3
Daniel Kurtz [Wed, 14 Mar 2012 17:32:44 +0000 (01:32 +0800)]
Use $DEVNODE and "Device Node" instead of $DEVPATH and "Evdev Physical"

When a new mouse is added, "mousecontrol add" gets called by udev, and
udev passes along a $DEVNODE with the newly added mouse's evdev device
node.  This device node can then be compared to the "Device Node" xinput
property for any xinput devices that use the xf86-input-evdev X input
driver.

The original method mostly worked, but relied on a "Evdev Physical"
property which isn't present in the upstream version of the
xf86-input-evdev.  Thus, it is preferred to use "Device Node" which is
present in the upstream driver.

BUG=chromium-os:25516
TEST=Attach a USB mouse, it should get detected and have its settings
  updated. Look for messages to that affect in /var/log/messages.

Change-Id: Iaa2054caf61b22a4bb9ad4e1936cfaa02a6dc31a

2 years agogenerate_userfeedback: script to generate userfeedback 69/15069/1 release-R18-1660.B
Andrew de los Reyes [Tue, 31 Jan 2012 01:53:50 +0000 (17:53 -0800)]
generate_userfeedback: script to generate userfeedback

We used to just have the logic encompassed in the script in the
userfeedback project, but it's getting more complex, so we move it to
the inputcontrol package.

BUG=chromium-os:25678
TEST=filed feedback on chrome, saw logs get generated and attached.

Change-Id: I017ec794fb49b53bb5b09a1549555ed7f449917f

2 years agotpcontrol_xinput: When deleting files, use -f 68/15068/1
Andrew de los Reyes [Tue, 31 Jan 2012 01:51:59 +0000 (17:51 -0800)]
tpcontrol_xinput: When deleting files, use -f

It's a corner case, but if tpcontrol log was called from root, then
from chronos, the rm can hang.

BUG=chromium-os:25678
TEST=tested tpcontrol log as root, then chronos, on device.

Change-Id: I7e904b44fd1d64b123fdf8bd001f11d3b451eaf1

2 years agotouchpad: Handle device arrival on udev; apply settings 25/14925/2
Andrew de los Reyes [Fri, 27 Jan 2012 02:06:29 +0000 (18:06 -0800)]
touchpad: Handle device arrival on udev; apply settings

This CL adds a udev script to detect when the touchpad arrives (which
can happen on wake from sleep) to restore tap to click and sensitivity
settings. The design is patterned on how the mouse scripts work.

BUG=chromium-os:25564
TEST=tested on device. Did rescan with:
echo -n rescan > /sys/devices/platform/i8042/serio4/drvctl

Change-Id: I5bfd8bdbeb04558440d6d24d24fac3722e103244

2 years agotpcontrol_xinput: Make runnable from VT2. 92/14592/1
Andrew de los Reyes [Sat, 21 Jan 2012 00:09:29 +0000 (16:09 -0800)]
tpcontrol_xinput: Make runnable from VT2.

This CL sets the DISPLAY and XAUTHORITY env variables so that this
script can be run from VT2.

BUG=chromium-os:25304
TEST=tested on device

Change-Id: I1665c82301316b8866d6f6993e4713b2e37b51ec

2 years agotpcontrol: Move tpcontrol* scripts from libcros ebuild to here. 91/14591/1
Andrew de los Reyes [Sat, 21 Jan 2012 00:04:51 +0000 (16:04 -0800)]
tpcontrol: Move tpcontrol* scripts from libcros ebuild to here.

This is a better location. This script moves the scripts as they
currently are, and makes no changes to them.

BUG=chromium-os:25302
TEST=manual emerge, saw them install

Change-Id: I8eb845271cb3bdea1e7e26c58472d445770cfa54

2 years agoMakefile: make scripts executable by all (0755) 13/14513/1
Andrew de los Reyes [Thu, 19 Jan 2012 20:56:52 +0000 (12:56 -0800)]
Makefile: make scripts executable by all (0755)

This is needed as Chrome (user chronos) can run them.

BUG=chromium-os:25259
TEST=emerge inputcontrol; check script permissions

Change-Id: I869d22a14a2d3d4a5e287dd1ef48f5496b377651

2 years agomousecontrol: Speed up known trackballs. 24/14424/1
Andrew de los Reyes [Thu, 19 Jan 2012 00:32:17 +0000 (16:32 -0800)]
mousecontrol: Speed up known trackballs.

This list is likely way too small, but it includes currently known
trackballs.

BUG=chromium-os:25221
TEST=tested various trackballs; they didn't feel super slow w/ this fix.

Change-Id: I7d66a3d56138afc383f12f04be4cf1c5f394af87

2 years agomousecontrol: Better mouse detection 23/14423/1
Andrew de los Reyes [Thu, 19 Jan 2012 00:32:04 +0000 (16:32 -0800)]
mousecontrol: Better mouse detection

Just grepping for "[Mm]mouse" in xinput list isn't enough. We look at
all slave pointing devices that use the evdev driver.

BUG=chromium-os:25220
TEST="mousecontrol sensitivity X" changed speed for all mice attached,
even ones w/o "mouse" in the name.

Change-Id: Iab9e580ea9325a37ccfafb54d0e05d938a880610

2 years agomousecontrol: use button map rather than Evdev property to swap left/right 22/14422/1
Andrew de los Reyes [Thu, 19 Jan 2012 00:31:44 +0000 (16:31 -0800)]
mousecontrol: use button map rather than Evdev property to swap left/right

This CL uses the standard X way to swap left and right mouse
buttons. A future CL will remove the option from Evdev.

BUG=chromium-os:25219
TEST="mousecontrol refresh" works on device with a mouse attached

Change-Id: I6ce2c8edcfc504e1a51e94fe2243eb3f5d1c9100

2 years agomouse.conf: Add upstart script to configure mice when X is started. 16/14316/2
Andrew de los Reyes [Tue, 17 Jan 2012 21:47:59 +0000 (13:47 -0800)]
mouse.conf: Add upstart script to configure mice when X is started.

BUG=chromium-os:24996
TEST=emerge-$BOARD -av1 inputcontrol; tested on device

Change-Id: I84376f86209f68156d03544e179c8064f988a265

2 years agomousecontrol: file to control the mouse settings, also udev rule 64/14064/4
Andrew de los Reyes [Thu, 12 Jan 2012 01:58:47 +0000 (17:58 -0800)]
mousecontrol: file to control the mouse settings, also udev rule

mousecontrol is a script, analogous to tpcontrol, which can be called
by chrome to change the sensitivity of the mice, or change other
settings (like switching the left/right mouse buttons).

There is also a udev rule to handle when mice are plugged in. All it
does is call mouse_added, which in turns forks off a background
process to add the mouse. It must be a background process, because
udev must return to complete the adding of the device, after which X
recognizes the defice, after which mousecontrol must set it up.

BUG=chromium-os:24996
TEST=tested the following: can call to change the
sensitivity. Plugging a mouse in after a call has the most recent
settings applied to it. Rebooting causes reasonable settings to be
applied to attached mice. Mice with different CPI that exist in the
internal database have the proper CPI applied when they are plugged
in.

Change-Id: I9723f3a5e1fcb9c2904573d98242869b3190b17e