como definir 'xinput set-prop' permanentemente após o evento do dispositivo conectado

0

Eu recebo o problema de rolagem do mouse (ou seja, a rolagem não funciona) após conectar o Apple Magic Mouse 2 ao meu laptop. Então eu encontrei uma solução alternativa de uma linha: xinput set-prop 14 300 0 0 1 , que vem de:

$ xinput list                                                                                                                             idanko@mbp
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ bcm5974                                   id=13   [slave  pointer  (2)]
⎜   ↳ Illia Danko’s Mouse                       id=14   [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)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Sleep Button                              id=10   [slave  keyboard (3)]
    ↳ FaceTime HD Camera (Built-in):            id=11   [slave  keyboard (3)]
    ↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12   [slave  keyboard (3)

$ xinput list-props 14                                                                                                                    idanko@mbp
Device 'Illia Danko’s Mouse':
    Device Enabled (149):   1
    Coordinate Transformation Matrix (151): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (295):   0
    libinput Natural Scrolling Enabled Default (296):   0
    libinput Scroll Methods Available (299):    0, 0, 1
    libinput Scroll Method Enabled (300):   0, 0, 0
    libinput Scroll Method Enabled Default (301):   0, 0, 0
    libinput Button Scrolling Button (628): 3
    libinput Button Scrolling Button Default (629): 3
    libinput Accel Speed (307): -0.525180
    libinput Accel Speed Default (308): 0.000000
    libinput Accel Profiles Available (630):    1, 1
    libinput Accel Profile Enabled (631):   1, 0
    libinput Accel Profile Enabled Default (632):   1, 0
    libinput Left Handed Enabled (309): 0
    libinput Left Handed Enabled Default (310): 0
    libinput Send Events Modes Available (272): 1, 0
    libinput Send Events Mode Enabled (273):    0, 0
    libinput Send Events Mode Enabled Default (274):    0, 0
    Device Node (275):  "/dev/input/event11"
    Device Product ID (276):    76, 617
    libinput Drag Lock Buttons (311):   <no items>
    libinput Horizontal Scroll Enabled (312):   1

mas funciona apenas manualmente e é redefinido o tempo todo quando o dispositivo é reconectado. Então, tentei adicionar o /usr/share/X11/xorg.conf.d/50-magicmouse.conf com o seguinte conteúdo:

Section "InputClass"
  Identifier "Apple Magic Mouse" # This can be anything
  MatchIsPointer "on"
  MatchDevicePath "/dev/input/event*"
  MatchProduct "Illia Danko’s Mouse" # Product name from 'xinput list'
  Driver "libinput" # From '.local/share/xorg/Xorg.0.log' after mouse connected
  Option "Scroll Method" "edge"
EndSection

mas não funciona, por favor me aponte o que poderia estar errado

    
por ilyuha21st 27.05.2018 / 17:25

0 respostas