Last active
March 30, 2024 11:04
-
-
Save mzz2017/7b9e20e0408b087c536878138198669e to your computer and use it in GitHub Desktop.
linux to mac keymaps - /etc/keyd/default.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Keep windows keymaps by default and add some macOS keymaps compatibility. | |
[ids] | |
* | |
[main] | |
capslock = leftshift | |
leftalt = layer(layer_leftcmd) | |
leftmeta = layer(layer_leftopt) | |
leftcontrol = layer(layer_leftctrl) | |
[layer_leftcmd:C] | |
space = A-space | |
# 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 | |
left = home | |
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 | |
# Cut | |
backspace = S-delete | |
# 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 | |
[layer_leftctrl:C] | |
space = macro(leftshift) | |
# cooperate with inputrc for ctrl+w compatibility | |
w = A-w | |
[layer_leftopt:M] | |
left = C-left | |
right = C-right | |
backspace = C-backspace | |
a = A-a | |
b = A-b | |
c = A-c | |
d = A-d | |
e = A-e | |
f = A-f | |
g = A-g | |
h = A-h | |
i = A-i | |
j = A-j | |
k = A-k | |
l = A-l | |
m = A-m | |
n = A-n | |
o = A-o | |
p = A-p | |
q = A-q | |
r = A-r | |
s = A-s | |
t = A-t | |
u = A-u | |
v = A-v | |
w = A-w | |
x = A-x | |
y = A-y | |
z = A-z | |
[layer_leftcmd+layer_leftctrl] | |
t = C-M-t | |
q = M-l | |
[layer_leftopt+layer_leftcmd] | |
space = M-e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment