add libinput mouse button mapping support

Here I am remapping button 12 to button 2, which allows me to middle
click with the Fn3 key on my Elecom HUGE trackball.
This commit is contained in:
Pig Monkey 2018-04-13 21:50:26 -07:00
parent 9f077c92d0
commit 2f44f28fb7
3 changed files with 10 additions and 0 deletions

View file

@ -209,6 +209,7 @@ himawaripy:
libinput:
middle_click_scroll: 12
button_mapping: "1 2 3 4 5 6 7 8 9 10 11 2"
display_manager: lightdm
gdm:

View file

@ -33,6 +33,10 @@
template: src=30-scroll.conf dest=/etc/X11/xorg.conf.d/30-scroll.conf
when: libinput.middle_click_scroll is defined
- name: Remap mouse buttons
template: src=30-button_mapping.conf dest=/etc/X11/xorg.conf.d/30-button_mapping.conf
when: libinput.button_mapping is defined
- include: sxhkd.yml
- include: unclutter.yml
- include: autorandr.yml

View file

@ -0,0 +1,5 @@
Section "InputClass"
Identifier "libinput button mapping"
Driver "libinput"
Option "ScrollButton" "{{ libinput.button_mapping }}"
EndSection