Customize keyboard with homerow mods and swapping alt/super

This commit is contained in:
larstvei 2025-08-24 18:27:23 +02:00
parent 6704608990
commit 0c178db4a8
3 changed files with 39 additions and 1 deletions

View File

@ -18,6 +18,7 @@
gestures.workspace_swipe = true;
input = {
kb_options = "altwin:swap_alt_win";
natural_scroll = true;
scroll_factor = 0.4;
touchpad = {

View File

@ -1,5 +1,4 @@
{
config,
pkgs,
emacs-larstvei,
zen-browser,
@ -12,6 +11,7 @@ in
imports = [
../../system
../../system/nixos
./keyboard.nix
./hardware-configuration.nix
];

View File

@ -0,0 +1,37 @@
{
services.kanata = {
enable = true;
keyboards = {
internalKeyboard = {
devices = [
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
extraDefCfg = "process-unmapped-keys yes";
config = ''
(defsrc
caps a s d f j k l ;
)
(defvar
tap-time 150
hold-time 200
)
(defalias
caps (tap-hold 100 100 esc lctl)
a (tap-hold $tap-time $hold-time a lsft)
s (tap-hold $tap-time $hold-time s lalt)
d (tap-hold $tap-time $hold-time d lmet)
f (tap-hold $tap-time $hold-time f lctl)
j (tap-hold $tap-time $hold-time j rctl)
k (tap-hold $tap-time $hold-time k rmet)
l (tap-hold $tap-time $hold-time l ralt)
; (tap-hold $tap-time $hold-time ; rsft)
)
(deflayer base
@caps @a @s @d @f @j @k @l @;
)
'';
};
};
};
}