-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xkeymap.hid_apple.xkb
52 lines (48 loc) · 1.54 KB
/
.xkeymap.hid_apple.xkb
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
// This is the layout for the apple keyboard:
// - Apple Inc. Apple Keyboard
//
// All it does, is swap Ctrl <-> Cmd
//
// Load it with "xkbcomp -i 13 .xkeymap.hid_apple.xkb $DISPLAY"
//
// As usual, archlinux wiki has extensive description [1].
//
// [1]: https://wiki.archlinux.org/title/Xorg/Keyboard_configuration
//
// Note, to reload do not forget to pass the display:
//
// xkbcomp ~/.xkeymap.hid_apple.xkb :0
//
// And to see the key code you can use xev.
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compatibility { include "complete" };
xkb_symbols {
# setxkbmap us,ru -option grp:caps_toggle -print
include "pc"
include "us"
include "ru:2"
include "inet(evdev)"
include "keypad(pointerkeys)"
include "group(caps_toggle)"
key <LCTL> { [ Super_L ] };
key <RCTL> { [ Super_R ] };
key <LWIN> { [ Control_L ] };
key <RWIN> { [ Control_R ] };
key <SUPR> { [ Control_L ] };
modifier_map Mod4 { <LCTL> };
modifier_map Control { <LWIN> };
modifier_map Mod4 { <RCTL> };
modifier_map Control { <RWIN> };
modifier_map Mod4 { <RCTL> };
modifier_map Control { <SUPR> };
// NOTE: order is important, this should be done *after* modifier_map/replace,
// othewise will not work.
include "level3(ralt_switch)"
// NOTE: do not use eurosign(e) since this will break C-E:
// - readline go to end-of-line
// - fzf edit before execute
include "eurosign(5)"
};
};