In Windows, the keyboard light will be on, but after installing the Ubuntu16.04 dual system, the keyboard light will not be on

After installing the dual system, the keyboard light will not turn on. It is very uncomfortable to look at the keyboard. After walking around the Internet, the reason should be a driver problem, but this problem can still be solved in front of linux.

    First go to a directory where you want to save the file

Enter the command (vim is installed by default)

vi led.sh

Copy the code below

#!/bin/bash -  
#===============================================================================  
#  
#          FILE: ledctrl.sh  
#  
#        USAGE: ./ledctrl.sh  
#  
#  DESCRIPTION:  
#  
#      OPTIONS: ---  
#  REQUIREMENTS: ---  
#          BUGS: ---  
#        NOTES: ---  
#        AUTHOR: Richard  
#  ORGANIZATION:  
#      CREATED: 2014-12-04 21:56:37 CST  
#      REVISION:  ---  
#===============================================================================  
  
  
status=/tmp/keyboard_led_status  
if [[ ${1} == "on" ]] || [[ ! -e ${status} ]]; then  
    xset led named 'Scroll Lock' && echo "on" > ${status}  
else  
    xset -led named 'Scroll Lock' && rm -f ${status}  
be

Press the i key in the previous window so that you can enter the character and then paste ok and then press the Esc key and then the colon: enter wq and finally the enter key to end

remember this directory

Open keyboard in system settings


click the plus sign


The name is arbitrary and the command is a directory plus a script file, click Apply.

There should be a new , click on it, press a key or a combination of several keys on the keyboard, click on the left, then the shortcut key you just set, see if it works, if possible, you're done,

If it doesn't work, there should be a problem with the command line. You paste that line of command in the terminal. If the terminal doesn't work, there is a problem with the command. After debugging it yourself, paste it into the command line and it will be OK.

If it works in the terminal, but the shortcut key doesn't work, there is a problem with the new accelerator key in the upper right corner . Try to modify that key.

good luck!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324852327&siteId=291194637