oratake / dotfiles

dotfile共の墓場
0 stars 0 forks source link

Linux トラックボールで大玉スクロールしたい #36

Closed oratake closed 1 year ago

oratake commented 4 years ago

https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse

oratake commented 4 years ago

薬指のクリックにごろごろスクロールのトグルを宛てたい

$ xinput list でマウスのidみつつ

buttonは10っぽい

❯ xinput query-state 14                                
2 classes :                               
ButtonClass                               
        button[1]=up                                                                 
        button[2]=up                                                                 
        button[3]=up                                                                 
        button[4]=up                                                                 
        button[5]=up                                                                 
        button[6]=up                                                                 
        button[7]=up                                                                 
        button[8]=up                                                                 
        button[9]=up                                                                 
        button[10]=down                                                              
ValuatorClass Mode=Relative Proximity=In                                             
        valuator[0]=1306                                                             
        valuator[1]=927                                                              
        valuator[2]=-15                                                              
        valuator[3]=-930
oratake commented 4 years ago

オプション一覧

❯ sudo xinput list-props 14
Device 'ELECOM ELECOM TrackBall Mouse':                                              
        Device Enabled (174):   1                                                    
        Coordinate Transformation Matrix (176): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000         
        libinput Natural Scrolling Enabled (317):       0   
        libinput Natural Scrolling Enabled Default (318):       0   
        libinput Scroll Methods Available (321):        0, 0, 1
        libinput Scroll Method Enabled (322):   0, 0, 0
        libinput Scroll Method Enabled Default (323):   0, 0, 0
        libinput Button Scrolling Button (335): 2        
        libinput Button Scrolling Button Default (336): 2
        libinput Button Scrolling Button Lock Enabled (337):    0
        libinput Button Scrolling Button Lock Enabled Default (338):    0
        libinput Middle Emulation Enabled (327):        0
        libinput Middle Emulation Enabled Default (328):        0
        libinput Rotation Angle (796):  0.000000
        libinput Rotation Angle Default (797):  0.000000
        libinput Accel Speed (329):     0.000000
        libinput Accel Speed Default (330):     0.000000
        libinput Accel Profiles Available (339):        1, 1
        libinput Accel Profile Enabled (340):   1, 0
        libinput Accel Profile Enabled Default (341):   1, 0
        libinput Left Handed Enabled (331):     0
        libinput Left Handed Enabled Default (332):     0
        libinput Send Events Modes Available (294):     1, 0
        libinput Send Events Mode Enabled (295):        0, 0
        libinput Send Events Mode Enabled Default (296):        0, 0
        Device Node (297):      "/dev/input/event17"
        Device Product ID (298):        1390, 252
        libinput Drag Lock Buttons (333):       <no items>
        libinput Horizontal Scroll Enabled (334):       1
oratake commented 4 years ago

オプション (man libinput) https://www.systutorials.com/docs/linux/man/4-libinput/

2つつかえばよさそう

Archのwikiもみつつ /usr/share/X11/xorg.conf.d/40-libinput.conf に追記

Section "InputClass"
        Identifier  "ELECOM ELECOM TrackBall Mouse"
        MatchProduct "ELECOM ELECOM TrackBall Mouse"
        Driver "libinput"
        Option "ScrollButton" "10"
        Option "ScrollMethod" "button"
EndSection
oratake commented 1 year ago

zennにまとめたので close https://zenn.dev/oratake/articles/linux-trackball-xinput-scroll