1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-07-21 19:05:19 +02:00

Split Karabiner remaps by built-in and G213 device

This commit is contained in:
TheGeneralist 2026-06-05 13:27:04 +02:00
parent 7bf3bd5c8a
commit eb40bafb6d
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4

View file

@ -68,7 +68,8 @@ let
]) numbers ]) numbers
); );
simple_modifications = [ # Swap Fn/Globe and left Control only on the built-in keyboard.
builtinKeyboardSimpleModifications = [
{ {
from.apple_vendor_top_case_key_code = "keyboard_fn"; from.apple_vendor_top_case_key_code = "keyboard_fn";
to = [ { key_code = "left_control"; } ]; to = [ { key_code = "left_control"; } ];
@ -85,7 +86,12 @@ let
is_keyboard = true; is_keyboard = true;
}; };
# Keep the G213's left Control as Fn and swap its Windows/Alt modifiers.
logitechG213SimpleModifications = [ logitechG213SimpleModifications = [
{
from.key_code = "left_control";
to = [ { apple_vendor_top_case_key_code = "keyboard_fn"; } ];
}
{ {
from.key_code = "left_command"; from.key_code = "left_command";
to = [ { key_code = "left_option"; } ]; to = [ { key_code = "left_option"; } ];
@ -319,16 +325,19 @@ let
name = "default"; name = "default";
selected = true; selected = true;
virtual_hid_keyboard.keyboard_type_v2 = "ansi"; virtual_hid_keyboard.keyboard_type_v2 = "ansi";
inherit simple_modifications;
inherit complex_modifications; inherit complex_modifications;
devices = [ devices = [
{ {
identifiers = logitechG213Identifiers; identifiers = {
simple_modifications = logitechG213SimpleModifications; is_keyboard = true;
is_built_in_keyboard = true;
};
simple_modifications = builtinKeyboardSimpleModifications;
} }
{ {
identifiers.is_keyboard = true; identifiers = logitechG213Identifiers;
simple_modifications = logitechG213SimpleModifications;
} }
]; ];
} }