xinput
Hinweis: Einige Devices können 2 mal gelistet sein:
Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ ELECOM TrackBall Mouse HUGE TrackBall id=13 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=17 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ ELECOM TrackBall Mouse HUGE TrackBall id=20 [slave keyboard (3)]
Hier taucht „ELECOM TrackBall Mouse HUGE TrackBall“ 2 mal auf.
Die ID existiert immer nur für ein Device, der Name kann aber mehrfach auftreten.
Bei Nutzung des Namens muss ggf. dann „pointer:“ oder „keyboard:“ davor geschrieben werden (Wichtig: Ohne Leerzeichen zwischen Namen und Prefix).
Hinweis: Die IDs sind temporär und können sich nach dem Neustart von X oder dem System oder dem Ein-und Ausstecken des Devices oder bei Nutzung eines Tastaturumschalters ändern.
xinput --list-props 11 Device 'ELECOM TrackBall Mouse HUGE TrackBall': Device Enabled (143): 1 Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Natural Scrolling Enabled (286): 0 libinput Natural Scrolling Enabled Default (287): 0 libinput Scroll Methods Available (288): 0, 0, 1 libinput Scroll Method Enabled (289): 0, 0, 1 libinput Scroll Method Enabled Default (290): 0, 0, 0 libinput Button Scrolling Button (291): 9 libinput Button Scrolling Button Default (292): 2 libinput Middle Emulation Enabled (293): 1 libinput Middle Emulation Enabled Default (294): 0 libinput Rotation Angle (295): 0.000000 libinput Rotation Angle Default (296): 0.000000 libinput Accel Speed (297): 0.121739 libinput Accel Speed Default (298): 0.000000 libinput Accel Profiles Available (299): 1, 1 libinput Accel Profile Enabled (300): 1, 0 libinput Accel Profile Enabled Default (301): 1, 0 libinput Left Handed Enabled (302): 0 libinput Left Handed Enabled Default (303): 0 libinput Send Events Modes Available (267): 1, 0 libinput Send Events Mode Enabled (268): 0, 0 libinput Send Events Mode Enabled Default (269): 0, 0 Device Node (270): "/dev/input/event7" Device Product ID (271): 1390, 269 libinput Drag Lock Buttons (304): <no items> libinput Horizontal Scroll Enabled (305): 1
xinput --set-prop <Device-Name (in "") or ID> "Propertie to be set" <Value>
Beispiel:
xinput --set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" "libinput Button Scrolling Button" 9 xinput --set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" "libinput Scroll Method Enabled" 0, 0, 1
Obiges Beispiel nutzt den Device-Namen zum addressieren des Devices. Da der Name einmal von einem virtuellen Keyboard und einmal von einem Pointer verwendet wird muss man pointer: vor den Namen schreiben.
Der erste Befehl definiert den Button 9 als „Scroll Button“ - das drücken und gleichzeitige Bewegen des Trackballs (oder Maus) wird als Scrollen gewertet.
Der zweite Befehl aktiviert das Scrollen per Tastendruck und bewegen des Eingabegerätes.
Hinweis: Bei Werten mit Komma, muss nach dem Komma zwingend ein Leerzeichen kommen!
Hinweis:: Die Einstellungen sind temporär - bis X oder das System neugestartet wird, das Device herausgezogen und wieder eingesteckt wird oder per Tastaturumschalter zwischen Systemen gewechselt wird
Im folgenden der Weg über eine xorg.conf bzw. eine Datei unter /etc/X11/xorg.conf.d:
Eine Datei /etc/X11/xorg.conf.d/99-libinput.conf (das Verzeichnich xorg.conf.d muss ggf. angelegt werden, der Dateiname ist egal, muss auf .conf enden) könnte so aussehen:
Section "InputClass" Identifier "ElcomHuge" MatchProduct "ELECOM TrackBall Mouse HUGE TrackBall" MatchIsPointer "true" Driver "libinput" Option "ScrollMethod" "button" Option "ScrollButton" "9" EndSection
<xsh bash> xinput –set-prop „pointer:ELECOM TrackBall Mouse HUGE TrackBall“ „libinput Button Scrolling Button“ 9 xinput –set-prop „pointer:ELECOM TrackBall Mouse HUGE TrackBall“ „libinput Scroll Method Enabled“ 0, 0, 1 </xsh>
Obiges Beispiel setzt Button 9 (zu ermitteln via xev) als Scroll-Button (Button der gedrückt werden muss damit die Bewegung als Scrollen erkannt wird) und aktiviert das Scrollen per Button + Bewegung im zweiten Schritt als (zusätzliche) Scroll-Methode.
Ein xorg.conf-File (/etc/X11/xorg.conf.d/99-libinput.conf) könnte so aussehen für obige Konfiguration:
Section "InputClass" Identifier "ElcomHuge" MatchProduct "ELECOM TrackBall Mouse HUGE TrackBall" MatchIsPointer "true" Driver "libinput" Option "ScrollMethod" "button" Option "ScrollButton" "9" EndSection