-
Notifications
You must be signed in to change notification settings - Fork 0
/
emacs
74 lines (63 loc) · 1.84 KB
/
emacs
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
// https://emacsnotes.wordpress.com/2022/10/30/use-xkb-to-setup-full-spectrum-of-modifiers-meta-alt-super-and-hyper-for-use-with-emacs/
default partial modifier_keys
// Default Configuration
// - RALT generates Alt
// - LALT generates Alt (used to be Meta before emacs 29.2)
// - LWIN generates Super
// - CAPS generates Control
// - LCTL generates Hyper
xkb_symbols "default" {
include "emacs(ctrl_caps)"
include "emacs(alt_ralt)"
include "emacs(meta_lalt)"
include "emacs(super_lwin)"
include "emacs(hyper_lctrl)"
include "emacs(modifier_mapping)"
};
// CONTROL
partial modifier_keys
xkb_symbols "ctrl_caps" {
replace key <CAPS> { [Control_L, Control_R] };
include "emacs(modifier_mapping)"
};
// ALT
partial modifier_keys
xkb_symbols "alt_ralt" {
replace key <RALT> { [Alt_L, Alt_R] };
include "emacs(modifier_mapping)"
};
// META
partial modifier_keys
xkb_symbols "meta_lalt" {
replace key <LALT> { [Meta_L, Meta_R] };
/// old real alt
//replace key <LALT> { [Alt_L, Alt_R] };
include "emacs(modifier_mapping)"
};
// SUPER
partial modifier_keys
xkb_symbols "super_lwin" {
replace key <LWIN> { [Super_L, Super_R] };
include "emacs(modifier_mapping)"
};
// HYPER
partial modifier_keys
xkb_symbols "hyper_lctrl" {
replace key <LCTL> { [Hyper_L] };
include "emacs(modifier_mapping)"
};
partial modifier_keys
xkb_symbols "modifier_mapping" {
modifier_map Control { <CAPS> , Control_L , Control_R };
modifier_map Mod1 { <ALT> , Alt_L , Alt_R };
modifier_map Mod2 { <META> , Meta_L , Meta_R };
modifier_map Mod3 { <SUPR> , Super_L , Super_R };
modifier_map Mod4 { <LCTL> , Hyper_L , Hyper_R };
};
// None
partial modifier_keys
xkb_symbols "none" {
};
// Local Variables:
// mode: c
// End: