You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Event8 is active, and i can run a evtest and see when capslock is pressed. Its just waybar says it can't find a device at event8. I can change this to event3, and it detects and reads my MX Masters 3 mouse, I can also plug in any other keyboard and it properly reads the caps lock in the waybar.
I think its a compatibility issue? idk.
I did add my user to the group. So it shouldnt be a permissions issue, especially since waybar can accurately detect other devices.
event8 is the zmk keyboard on this boot, it changes everyboot, that device-path line was just added for debugging purposes.
The text was updated successfully, but these errors were encountered:
#!/bin/bash
caps_lock_state=false
state_file=/tmp/caps_lock_state.txt
evtest /dev/input/by-id/usb-ZMK_Project_Cyboard_64473BEE7CA8FBD7-event-kbd | while read -r line; do
if echo "$line" | grep -q "EV_KEY.*KEY_CAPSLOCK"; then
if echo "$line" | grep -q "value 1"; then
if $caps_lock_state; then
caps_lock_state=false
echo "" > "$state_file"
notify-send "Caps Lock OFF"
else
caps_lock_state=true
echo "" > "$state_file"
notify-send "Caps Lock ON"
fi
fi
fi
done
It's pretty self-explanatory, but the script assumes that the caps lock is off at the computer's start. Whenever the caps lock is pressed, it changes the contents of a temp file, which is displayed in the swaybar. The file gets deleted on every boot.
edit: I would imagine the name of your zmk keyboard will be different from mine, so you would need to change that. You will likely find it in /dev/input/by-id/
I am running the latest waybar. I have the following in my config.
Event8 is active, and i can run a evtest and see when capslock is pressed. Its just waybar says it can't find a device at event8. I can change this to event3, and it detects and reads my MX Masters 3 mouse, I can also plug in any other keyboard and it properly reads the caps lock in the waybar.
I think its a compatibility issue? idk.
I did add my user to the group. So it shouldnt be a permissions issue, especially since waybar can accurately detect other devices.
event8 is the zmk keyboard on this boot, it changes everyboot, that device-path line was just added for debugging purposes.
The text was updated successfully, but these errors were encountered: