https://extensions.gnome.org/extension/3939/fnlock-switch-thinkpad-compact-usb-keyboard/
GNOME shell extension that adds FnLock toggle button (indicator) to GNOME top panel. Supports both:
- Lenovo ThinkPad Compact USB Keyboard
- Lenovo ThinkPad Trackpoint Keyboard II (wireless / Bluetooth)
It needs write access to /sys/.../fn_lock
, and /dev/fnlock-switch
symlink must exist. An example udev rule:
cat <<'EOF' > /etc/udev/rules.d/99-thinkpad-keyboard.rules
SUBSYSTEM=="input", DRIVERS=="lenovo", RUN += "/bin/sh -c 'FILE=$(find /sys/devices/ -name fn_lock 2>/dev/null); test -f $FILE && chown <CHANGE_USERNAME> $FILE && ln -f -s $FILE /dev/fnlock-switch'"
EOF
Extension's keybinding for both keyboards is Ctrl + Esc
It looks like there is no way to bind Fn button for keybindings, so Ctrl here is fine too.
The stadard hardware keybinding on wireless keyboard in Bluetooth mode will work as well: Fn + Esc
TBD: prefs
# workaround
cat << EOF | dconf load /org/gnome/shell/extensions/fnlock/
[/]
keybinding=['<Control>Escape']
EOF
- FnLock current status indicator seems to be helpful
- Solution for isssue with ThinkPad Compact USB Keyboard and Lenovo ThinkPad Trackpoint Keyboard II (2.4G wireless mode), when Fn+Esc isn't working in Linux.
Manual toggling by writing 1|0 into
/sys/.../fn_lock
is possible though.
If you like this GNOME extension, you may buy me a coffee sometime
https://www.donationalerts.com/r/dmitry_goloshubov