Do not convert alt+left-click to right-click for usb mice |
||
Issue descriptionChromeOS converts alt+left-click to right-click [1]. This makes it easier to trigger a right-click on touchpad. But for usb-mice which usually have a right-click button, this shortcut isn't necessary. So for alt+left-click events coming from a usb mouse-device, we should stop converting it to right-click. Implementation-wise: ui::Event has a |source_device_id_| [2], which can be associated with a mouse or touch-pad device maintained by DeviceDataManager [3]. So as long as we detect the devices correctly (and I believe we do on chromeos), it should be relatively easy, in theory, to do. This is kind of related to issue 248762, but has a smaller scope. Tentatively assigning to afakhry@ as the owner for issue 248762 (cc +abodenha@). [1] https://cs.chromium.org/chromium/src/ui/chromeos/events/event_rewriter_chromeos.cc?l=1174 [2] https://cs.chromium.org/chromium/src/ui/events/event.h?l=352 [3] https://cs.chromium.org/chromium/src/ui/events/devices/device_data_manager.h?l=32
,
Oct 15
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/719548cc5bbb5aaebea4e6436ce75704acf39da5 commit 719548cc5bbb5aaebea4e6436ce75704acf39da5 Author: Ahmed Fakhry <afakhry@chromium.org> Date: Mon Oct 15 23:47:19 2018 Limit alt+click -> right-click remapping to touchpads only Many media and creative suite applications make use of Alt+Click actions, but we always rewrite it to Right-Click without giving the users a way to turn this behavior off. Users of such applications often use external mice, which already have an independent right click button. This CL limits this behavior to events coming from touchpad devices. BUG= 890648 TEST=Expanded tests. Change-Id: I1b72eb4d9986e9139d7c6193cc2f808a6d9cad06 Reviewed-on: https://chromium-review.googlesource.com/c/1255605 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Commit-Queue: Ahmed Fakhry <afakhry@chromium.org> Cr-Commit-Position: refs/heads/master@{#599783} [modify] https://crrev.com/719548cc5bbb5aaebea4e6436ce75704acf39da5/chrome/browser/chromeos/DEPS [modify] https://crrev.com/719548cc5bbb5aaebea4e6436ce75704acf39da5/chrome/browser/chromeos/events/event_rewriter_unittest.cc [modify] https://crrev.com/719548cc5bbb5aaebea4e6436ce75704acf39da5/ui/chromeos/events/event_rewriter_chromeos.cc
,
Oct 15
,
Oct 15
Too bad I have not noticed this earlier. We should not be looking at the type of device, but rather at capabilities. If device has a right button, then there is no need to emulate right click with alt. |
||
►
Sign in to add a comment |
||
Comment 1 by afakhry@chromium.org
, Oct 1