-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmouseKeys.sh
113 lines (62 loc) · 2.61 KB
/
mouseKeys.sh
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
#!/bin/bash
currentWindow=$(xdotool getactivewindow getwindowname)
inputKey=$1
case "$inputKey" in
mouseWheelPress)
case "$currentWindow" in
*"Firefox"*)
xte 'key F5' # reload page
;;
esac
;; # end of mouseWheelPress
#################################################################################################################
mouseWheelRight)
case "$currentWindow" in
*"Kate"*)
xte 'keydown Alt_L' 'key Right' 'keyup Alt_L' # next tab
;;
*"Firefox"*)
xte 'keydown Control_L' 'key Tab' 'keyup Control_L' # next tab
;;
*"KMail"*)
xte 'key Right' # next message
;;
esac
;; # end of mouseWheelRight
#################################################################################################################
mouseWheelLeft)
case "$currentWindow" in
*"Kate"*)
xte 'keydown Alt_L' 'key Left' 'keyup Alt_L' # previous tab
;;
*"Firefox"*)
xte 'keydown Control_L' 'keydown Shift_L' 'key Tab' 'keyup Shift_L' 'keyup Control_L' # previous tab
;;
*"KMail"*)
xte 'key Left' # previous message
;;
esac
;; # end of mouseWheelLeft
#################################################################################################################
thumbLower)
case "$currentWindow" in
*"Firefox"*)
xte 'keydown Alt_L' 'key Left' 'keyup Alt_L' # back
;;
*"KMail"*)
xte 'key a' # reply to all
;;
esac
;; # end of thumbLower
#################################################################################################################
thumbUpper)
case "$currentWindow" in
*"KMail"*)
xte 'key Delete' # delete message
;;
*)
xte 'keydown Control_L' 'key w' 'keyup Control_L' # close current window
;;
esac
;; # end of thumbUpper
esac