-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenable_pixel_shortcuts.sh
executable file
·35 lines (24 loc) · 1.24 KB
/
enable_pixel_shortcuts.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
#!/usr/bin/sh
#Requirements:
# TODO: Add if needed
#Pixel keyboard shortcuts, emulated with xmodmap
#Customize keymappings for the pixel-c keyboard
# ... key --> keycode 108 Alt_R
# <search/mag glass> --> keycode 133 Super_L
#turn ... into distinct mod key, we use Mode_switch here
# key shift+key Mode_switch+key Mode_switch+shift+key
xmodmap -e "keycode 108 = Mode_switch Mode_switch Mode_switch Mode_switch"
#... + o (keycode 32) --> [ (keycode 34 bracketleft)
#... + shift + o (keycode 32) --> { (keycode 34 braceleft)
xmodmap -e "keycode 32 = o O bracketleft braceleft"
#... + p (keycode 33) --> ] (keycode 35 bracketright)
#... + shift + p (keycode 33) --> } (keycode 35 braceright)
xmodmap -e "keycode 33 = p P bracketright braceright"
#... + = (keycode 21) --> \ (keycode 51 backslash)
#... + shift + = (keycode 21) --> | (keycode 51 bar)
xmodmap -e "keycode 21 = equal plus backslash bar"
#... + 2 (keycode 11) --> ` (keycode 49 grave)
#... + shift + 2 (keycode 11) --> ~ (keycode 49 asciitilde)
xmodmap -e "keycode 11 = 2 at grave asciitilde"
#... + 1 (keycode 10) --> Esc (keycode 34)
xmodmap -e "keycode 10 = 1 exclam Escape NoSymbol"