Someone sent me over here from the main page, original post
I've got a Royal Kludge RK61 (60%) keyboard that has different modes depending on a few different combinations of Fn+Enter / Ctrl / Windows. Unfortunately, there is no actual indication as to which mode the keyboard has selected in any way. I'm looking to change that with my extremely limited bash knowledge by implementing a notification upon key press.
I checked xev which didn't recognize the 61's Fn, however my laptops Fn did register. I ended up using the Fn key keysym code from my laptops keyboard and incorporated it below.
I found some code that seems it would do what I want, but I think my incorporation of the data needed is flawed, or wrong even as I'm extremely green.
#!/bin/bash
while true; do
read $key input
if [ "$input" = "keysym 0x1008ff2b" + "keysym 0xff0d" ]; then
notify-send -u normal -i $HOME/Downloads/keyboard_icon.jpeg "Keyboard is now in Function mode:" " Arrow Keys on"
fi
done
How do I ensure that it would be executed without needing the console open if this is even correct? Further more, with the 60%'s Fn not registering in xev, what am I supposed to do?