-
Notifications
You must be signed in to change notification settings - Fork 1
/
ubuntu_key_remap.sh
executable file
·43 lines (35 loc) · 1.31 KB
/
ubuntu_key_remap.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
#################################333
### KEYBOARD customization
### Capslock as Enter
### Right Alt swap with Rright Ctrl
### learn /usr/share/X11/xkb
### http://www.charvolant.org/~doug/xkb/html/index.html
# ESCAPE_KEYCODE=9
# CAPS_KEYCODE=66
# LCONTROL_KEYCODE=37
# SPACE=65
###############################k
### INSTALATION
# Startup Applications > Add >
# Name: Remap keys
# Command: /bin/bash /home/ppalucki/dotfiles/ubuntu_key_remap
### ---------------------- capslock as enter
# Disable caps-lock
setxkbmap -option caps:none
# Remap Enter to Caps-lock
xmodmap -e 'keycode 66 = Return NoSymbol Return'
### ---------------------- !Swap right control and right alt
# 108 - to fizyczny prawy Alt
# 105 - to fizyczny prawy Ctrl
# 1.Turn off right Ctrl (remove Control_R from "control")
# This removes all keys containing the given keysyms from the indicated modifier map.
xmodmap -e 'remove control = Control_R'
xmodmap -e 'remove mod1 = Alt_R'
# 2. Physical right Ctrl acts as Alt
xmodmap -e 'keycode 105 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift'
# 3. Physical right Alt (108) acts as Control R
xmodmap -e 'keycode 108 = Control_R'
# 4. This adds all keys containing the given keysyms to the indicated modifier map.
xmodmap -e 'remove mod1 = Control_R'
xmodmap -e 'add control = Control_R'
xmodmap -e 'add mod1 = Alt_R'