-
Notifications
You must be signed in to change notification settings - Fork 1
/
MX-Master-3.xbindkeysrc
115 lines (104 loc) · 4.18 KB
/
MX-Master-3.xbindkeysrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
########################################################################################################################
# Logitech MX Master 3 - xbindkeys configuration #
########################################################################################################################
#
# Scroll wheel: btn 4-5 (up/down)
# Thumb wheel: btn 6-7 (right/left)
# Back/forward buttons: btn 8-9
# Thumb button sends:
# - on press: Super_L(Mod4) press + Tab press + Tab release
# - on release: Super_L(Mod4) release
#
# Prerequisites:
#
# - xdotool
#
# sudo apt install xdotool
#
# - Gnome shortcut tweaks:
#
# Gnome settings -> Keyboard -> Navigation -> Swith applications -> 'Alt + Tab'
# Gnome tweaks -> Overview shortcut -> 'Right Super'
#
# More info:
# cat /proc/bus/input/devices
# xinput list
# xinput test 15
#
########################################################################################################################
### Global shortcuts ###
## Thumb button
# Open Gnome overview programmatically (Thumb button sends Super_L on release, which might break any super-based shortcut depending on timing)
# https://askubuntu.com/questions/1095553/invoking-gnome-activities-overview-from-command-line/1095614#1095614
# Also, since this shortcut is not intended to be application-specific, it is faster to call it directly here rather than from the external script
"dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'"
Mod4 + Tab + release
## Scrollwheel up
"xdotool key Page_Up" # Move to workspace above
Mod4 + b:4 + release
## Scrollwheel down
"xdotool key Page_Down" # Move to workspace below
Mod4 + b:5 + release
### Application-specific shortcuts ###
## Scrollwheel left
#"xte 'keydown Control_L' 'keydown Shift_R' 'key Tab' 'keyup Shift_R' 'keyup Control_L'"
"~/.xbindkeys/mouse-bindings.sh WScroll_L"
b:7 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_L Alt"
Alt + b:7 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_L Control"
Control + b:7 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_L Shift+Control"
Shift+Control + b:7 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_L Shift+Alt"
Shift+Alt + b:7 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_L Control+Alt"
Control+Alt + b:7 + release
## Scrollwheel right
#"xte 'keydown Control_L' 'key Tab' 'keyup Control_L'"
"~/.xbindkeys/mouse-bindings.sh WScroll_R"
b:6 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_R Alt"
Alt + b:6 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_R Control"
Control + b:6 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_R Shift+Control"
Shift+Control + b:6 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_R Shift+Alt"
Shift+Alt + b:6 + release
"~/.xbindkeys/mouse-bindings.sh WScroll_R Control+Alt"
Control+Alt + b:6 + release
## Back button
"~/.xbindkeys/mouse-bindings.sh Back"
b:8 + release
"~/.xbindkeys/mouse-bindings.sh Back Shift"
Shift + b:8 + release
"~/.xbindkeys/mouse-bindings.sh Back Control"
Control + b:8 + release
"~/.xbindkeys/mouse-bindings.sh Back Alt"
Alt + b:8 + release
"~/.xbindkeys/mouse-bindings.sh Back Shift+Control"
Shift+Control + b:8 + release
"~/.xbindkeys/mouse-bindings.sh Back Shift+Alt"
Shift+Alt + b:8 + release
"~/.xbindkeys/mouse-bindings.sh Back Control+Alt"
Control+Alt + b:8 + release
"~/.xbindkeys/mouse-bindings.sh Back Shift+Control+Alt"
Shift+Control+Alt + b:8 + release
## Forward button
"~/.xbindkeys/mouse-bindings.sh Forward"
b:9 + release
"~/.xbindkeys/mouse-bindings.sh Forward Shift"
Shift + b:9 + release
"~/.xbindkeys/mouse-bindings.sh Forward Control"
Control + b:9 + release
"~/.xbindkeys/mouse-bindings.sh Forward Alt"
Alt + b:9 + release
"~/.xbindkeys/mouse-bindings.sh Forward Shift+Control"
Shift+Control + b:9 + release
"~/.xbindkeys/mouse-bindings.sh Forward Shift+Alt"
Shift+Alt + b:9 + release
"~/.xbindkeys/mouse-bindings.sh Forward Control+Alt"
Control+Alt + b:9 + release
"~/.xbindkeys/mouse-bindings.sh Forward Shift+Control+Alt"
Shift+Control+Alt + b:9 + release