File: macos.conf

package info (click to toggle)
keyd 2.5.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,524 kB
  • sloc: ansic: 5,206; python: 1,121; makefile: 114; javascript: 105; perl: 95; sh: 80
file content (80 lines) | stat: -rw-r--r-- 2,028 bytes parent folder | download | duplicates (2)
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
# 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]
*

[main]

# Create a new "Cmd" button, with various Mac OS-like features below
leftalt = layer(meta_mac)

# Swap meta/alt
leftmeta = alt


# 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