-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kmonad): support multiple keyboards
- Loading branch information
1 parent
8ccc92b
commit e496ed9
Showing
3 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(defcfg | ||
input (device-file "/dev/input/by-id/usb-izwan_zwactyl_50_vial:f64c2b3c-event-kbd") | ||
output (uinput-sink "My KMonad output") | ||
|
||
;; Comment this if you want unhandled events not to be emitted | ||
fallthrough true | ||
|
||
;; Set this to false to disable any command-execution in KMonad | ||
allow-cmd false | ||
) | ||
|
||
(defsrc | ||
caps a s d f g h j k l ; | ||
) | ||
|
||
(defalias | ||
ctl_a (tap-hold-next-release 200 a lctl) | ||
alt_s (tap-hold-next-release 200 s lalt) | ||
met_d (tap-hold-next-release 200 d lmet) | ||
sft_f (tap-hold-next-release 200 f lsft) | ||
|
||
sft_j (tap-hold-next-release 200 j rsft) | ||
met_k (tap-hold-next-release 200 k rmet) | ||
alt_l (tap-hold-next-release 200 l ralt) | ||
ctl_; (tap-hold-next-release 200 ; rctl) | ||
) | ||
|
||
|
||
(deflayer qwerty | ||
esc @ctl_a @alt_s @met_d @sft_f g h @sft_j @met_k @alt_l @ctl_; | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
#!/bin/sh | ||
|
||
device_name="platform-i8042-serio-0-event-kbd" | ||
laptop="by-path/platform-i8042-serio-0-event-kbd" | ||
dactyl="by-id/usb-izwan_zwactyl_50_vial:f64c2b3c-event-kbd" | ||
|
||
if [ -e "/dev/input/by-path/${device_name}" ]; then | ||
kmonad "${HOME}/.config/kmonad/config.kbd" | ||
# This isn't an ideal solution. But the external keyboard gets high priority | ||
# than the laptop keyboard, so check for that first. | ||
if [ -e "/dev/input/${dactyl}" ]; then | ||
kmonad "${HOME}/.config/kmonad/dactyl.kbd" | ||
elif [ -e "/dev/input/${laptop}" ]; then | ||
kmonad "${HOME}/.config/kmonad/laptop.kbd" | ||
fi |
File renamed without changes.