mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(xremap): keyd alternative, better wl support
This commit is contained in:
parent
9889fc8b7d
commit
4977346e60
11 changed files with 734 additions and 30 deletions
54
nixcfgs/modules/nixos/desktop/xremap.nix
Normal file
54
nixcfgs/modules/nixos/desktop/xremap.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
../hardware/uinput.nix
|
||||
];
|
||||
|
||||
# Keycode: https://github.com/emberian/evdev/blob/1d020f11b283b0648427a2844b6b980f1a268221/src/scancodes.rs#L15
|
||||
# Alias for mods:
|
||||
# SHIFT-
|
||||
# CTRL-, C-, CONTROL-
|
||||
# ALT-, M-
|
||||
# WIN-, SUPER-, WINDOWS-
|
||||
|
||||
services.xremap = {
|
||||
enable = true;
|
||||
# modmap: single key
|
||||
serviceMode = "user";
|
||||
userName = "js0ny";
|
||||
config = {
|
||||
modmap = [
|
||||
{
|
||||
name = "Global";
|
||||
device = {
|
||||
not = [
|
||||
### QMK Keyboards
|
||||
# Nuphy Air 75 V2
|
||||
"/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-kbd"
|
||||
"/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-event-kbd"
|
||||
"/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-mouse"
|
||||
];
|
||||
};
|
||||
remap = {
|
||||
"KEY_CAPSLOCK" = {
|
||||
held = "KEY_LEFTCTRL";
|
||||
alone = "KEY_ESC";
|
||||
free_hold = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
keymap = [
|
||||
{
|
||||
name = "Telegram Navigator";
|
||||
application = {
|
||||
only = ["org.telegram.desktop" "telegram-desktop"];
|
||||
};
|
||||
remap = {
|
||||
"M-j" = "M-down"; # alt.j = macro(C-tab)
|
||||
"M-k" = "M-up"; # alt.k = C-S-tab
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue