Skip to content

Commit

Permalink
overload: preserve layer during pending action
Browse files Browse the repository at this point in the history
  • Loading branch information
lobre committed May 3, 2024
1 parent ca9aa51 commit bd73664
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ static long process_descriptor(struct keyboard *kbd, uint8_t code,
kbd->overload_start_time = time;
activate_layer(kbd, code, idx);
update_mods(kbd, -1, 0);
} else {
} else if (!kbd->pending_key.code) {
deactivate_layer(kbd, idx);
update_mods(kbd, -1, 0);

Expand Down
14 changes: 14 additions & 0 deletions src/vkbd/usb-gadget.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=usb gadget setup
Requires=systemd-modules-load.service,keyd.service
Before=keyd.service
After=systemd-modules-load.service


[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash /usr/local/bin/keyd-usb-gadget.sh

[Install]
WantedBy=keyd.service

0 comments on commit bd73664

Please sign in to comment.