Skip to content

Instantly share code, notes, and snippets.

@najathi
Last active July 6, 2024 19:22
Show Gist options
  • Save najathi/6e2fef1c73567d866b47e642599d3c83 to your computer and use it in GitHub Desktop.
Save najathi/6e2fef1c73567d866b47e642599d3c83 to your computer and use it in GitHub Desktop.
Add Scroll lock key feature in ubuntu
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