Last active
July 6, 2024 19:22
-
-
Save najathi/6e2fef1c73567d866b47e642599d3c83 to your computer and use it in GitHub Desktop.
Add Scroll lock key feature in ubuntu
This file contains hidden or 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
1. Navigate to home directory | |
nano ~/enable_scroll_lock_with_key.sh | |
#!/bin/bash | |
on=$(xset -q | grep 'Scroll Lock:' | cut -d ":" -f 7) | |
echo $on | |
if [ $on == "off" ]; then | |
xset led named "Scroll Lock" | |
else | |
xset -led named "Scroll Lock" | |
fi | |
chmod +x ./enable_scroll_lock_with_key.sh | |
Open Keyboard and add as a command | |
/home/najathi/enable_scroll_lock_with_key.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment