-
Notifications
You must be signed in to change notification settings - Fork 0
/
swap-num-sym-mode.el
50 lines (49 loc) · 1.49 KB
/
swap-num-sym-mode.el
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
(define-minor-mode swap-num-sym-mode
"Swap the keymaps of numbers and symbols"
nil
:lighter " swap-num-sym"
:keymap nil
(if swap-num-sym-mode
(progn
(keyboard-translate ?1 ?!)
(keyboard-translate ?2 ?@)
(keyboard-translate ?3 ?#)
(keyboard-translate ?4 ?$)
(keyboard-translate ?5 ?%)
(keyboard-translate ?6 ?^)
(keyboard-translate ?7 ?&)
(keyboard-translate ?8 ?*)
(keyboard-translate ?9 ?()
(keyboard-translate ?0 ?))
(keyboard-translate ?! ?1)
(keyboard-translate ?@ ?2)
(keyboard-translate ?# ?3)
(keyboard-translate ?$ ?4)
(keyboard-translate ?% ?5)
(keyboard-translate ?^ ?6)
(keyboard-translate ?& ?7)
(keyboard-translate ?* ?8)
(keyboard-translate ?( ?9)
(keyboard-translate ?) ?0))
(progn
(keyboard-translate ?1 ?1)
(keyboard-translate ?2 ?2)
(keyboard-translate ?3 ?3)
(keyboard-translate ?4 ?4)
(keyboard-translate ?5 ?5)
(keyboard-translate ?6 ?6)
(keyboard-translate ?7 ?7)
(keyboard-translate ?8 ?8)
(keyboard-translate ?9 ?9)
(keyboard-translate ?0 ?0)
(keyboard-translate ?! ?!)
(keyboard-translate ?@ ?@)
(keyboard-translate ?# ?#)
(keyboard-translate ?$ ?$)
(keyboard-translate ?% ?%)
(keyboard-translate ?^ ?^)
(keyboard-translate ?& ?&)
(keyboard-translate ?* ?*)
(keyboard-translate ?( ?()
(keyboard-translate ?) ?)))))
(provide 'swap-num-sym-mode)