![]() #Keyclick for surface 1 driver#usbcore: registered new interface driver usbhid Now it should toggle the LED and still allow caps locks to work. Sudo -k (To clear the sudo password cache from using visudo earlier)Īt this point all you need to do is set a custom keyboard shortcut for the caps lock button with this as the shortcut command: USERNAME ALL=(root) NOPASSWD: /usr/local/bin/keyfix.shīefore setting up the keyboard shortcut, test to make sure the script runs WITHOUT using sudo. Now append the following line right before the line containing includedir /etc/sudoers.d near the end of the file, replacing USERNAME with the correct username which you will grant the passwordless execution as root: Sudo chown root:root /usr/local/bin/keyfix.sh Since it requires a super user to use it, we will set up password-less access to the one file.įor security reasons, make sure to disable editing for non-root users: The script above simply alternates the LED on and off. Sudo echo '0' > /sys/class/leds/inputXX\:\:capslock/brightness Sudo echo '1' > /sys/class/leds/inputXX\:\:capslock/brightness ![]() Value=`sudo cat /sys/class/leds/inputXX\:\:capslock/brightness` ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |