-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyd.conf
93 lines (74 loc) · 2.34 KB
/
keyd.conf
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# NOTE: to use this, rename this file to default.conf and put in /etc/keyd/
# Mac-Like Configuration Example
#
# Uses "Alt" button to the left of spacebar as "Cmd" key
#
# Note:
# This 'trick' generally requires that the press+release of the Meta
# key will do nothing. On my system, I had to disable the "overlay-key"
# in mutter to make it inert:
# - `gsettings set org.gnome.mutter overlay-key ''`
[ids]
046d:c548 #Logitech USB Receiver Mouse (/dev/input/event21)
0001:0001 #AT Translated Set 2 keyboard (/dev/input/event0)
#*
[main]
# Create a new "Cmd" button, with various Mac OS-like features below
leftalt = layer(meta_mac)
# Swap meta/alt
leftmeta = layer(alt_mac)
# Use 'capslock' as both esc + control (just like xcape)
capslock = overload(ctrl_vim, esc)
# Also add a little vim-like navigational ease when holding caps+hjkl
[ctrl_vim:C]
h = C-pageup
j = pagedown
k = pageup
l = C-pagedown
[alt_mac:A]
# meta_mac modifier layer; inherits from 'Ctrl' modifier layer
#
# The main part! Using this layer, we can remap our new "Cmd" key to
# do almost everything our muscle memory might need...
[meta_mac:C]
# Meta-Space: Open the Launcher (a feature of gnome-shell)
# keybinding: ? how did we arrive at M-/ ?
space = M-/
# Switch directly to an open tab (e.g. Firefox, VS code)
1 = A-1
2 = A-2
3 = A-3
4 = A-4
5 = A-5
6 = A-6
7 = A-7
8 = A-8
9 = A-9
# Copy
c = C-insert
# Paste
v = S-insert
# Cut
x = S-delete
# Move cursor to beginning of line
left = home
# Move cursor to end of Line
right = end
# As soon as tab is pressed (but not yet released), we switch to the
# "app_switch_state" overlay where we can handle Meta-Backtick differently.
# Also, send a 'M-tab' key tap before entering app_switch_sate.
tab = swapm(app_switch_state, M-tab)
# Meta-Backtick: Switch to next window in the application group
# - A-f6 is the default binding for 'cycle-group' in gnome
# - keybinding: `gsettings get org.gnome.desktop.wm.keybindings cycle-group`
` = A-f6
# app_switch_state modifier layer; inherits from 'Meta' modifier layer
[app_switch_state:M]
# Meta-Tab: Switch to next application
# - keybinding: `gsettings get org.gnome.desktop.wm.keybindings switch-applications`
tab = M-tab
right = M-tab
# Meta-Backtick: Switch to previous application
# - keybinding: `gsettings get org.gnome.desktop.wm.keybindings switch-applications-backward`
` = M-S-tab
left = M-S-tab