Bug 104378 - xinput list [name] shouldn't be restricted to a single match
Summary: xinput list [name] shouldn't be restricted to a single match
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-23 16:28 UTC by wavexx
Modified: 2018-08-10 20:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description wavexx 2017-12-23 16:28:22 UTC
xinput --version
xinput version 1.6.2
XI version on server: 2.3

I have a laptop system with two keyboards with the same name.
I'm trying to write a script to set some device parameters, and I was hoping to get the device IDs by using:

  xinput list --id-only 'name'

However, while 'list --id-only' by itself works (spitting all IDs without any useful info), list --id-only 'name' will refuse to list anything if multiple devices from the same vendor exist.

I understand this behavior if I was using set-prop, but 'list' shouldn't have this restriction. list should always list *all* matching devices.

Example:

xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Wacom Pen and multitouch sensor Finger touch      id=13   [slave  pointer  (2)]
⎜   ↳ Wacom Pen and multitouch sensor Pen stylus        id=14   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=17   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=18   [slave  pointer  (2)]
⎜   ↳ Wacom Pen and multitouch sensor Pen eraser        id=20   [slave  pointer  (2)]
⎜   ↳ PixArt HP USB Optical Mouse               id=9    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=15   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=16   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=19   [slave  keyboard (3)]
    ↳ HID 05f3:0007                             id=10   [slave  keyboard (3)]
    ↳ HID 05f3:0007                             id=11   [slave  keyboard (3)]
    ↳ Plantronics Plantronics C320-M            id=12   [slave  keyboard (3)]

xinput list 'HID 05f3:0007'
Warning: There are multiple devices matching 'HID 05f3:0007'.
To ensure the correct one is selected, please use the device ID, or prefix the
device name with 'pointer:' or 'keyboard:' as appropriate.

unable to find device HID 05f3:0007
Comment 1 GitLab Migration User 2018-08-10 20:31:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xinput/issues/5.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.