Background lighting settings for the keyboard in Ubuntu

Source: Internet
Author: User

In Windows, the background light of the keyboard can be properly lit and closed through the scroll button, but it is found that how to press the scroll key in Ubuntu will not be on, So Baidu, use a script to set it.

 

#! /Bin/bash-# ======================================== ========================================================== ======## file: ledctrl # usage :. /ledctrl # Description: # options: --- # Requirements: --- # Bugs: --- # Notes: --- # Author: linkscue (Scue), [email protected] # organization: # created: February 13, 2014 CST # Revision: --- #===================================================== ========================================================== = Status =/Tmp/keyboard_led_statusif [[$ {1 }== "on"] | [[! -E $ {status}]; then xset led named 'scroll lock' & Echo "on" >$ {status} else xset-led named 'scroll lock' & Rm-F $ {status} fi

Create a new file and name it as needed. Put it in ~ /Bin/directory

Copy the code above and modify it to executable permissions.

This shell file can be directly executed. Every execution turns on and off the background light, which can be controlled.

However, we need to press the scroll button to switch the background light as we use it in windows.

Add the keyboard shortcut,

Open settings --> keyboard --> shortcut key, select Custom shortcut key, and create a new one. Enter the path of the file in the command.

 

Application. The corresponding button is disabled at this time. So click this line and the prompt "New acceleration key" appears. Press the scroll button. The test is successful ..

Reference http://www.cnblogs.com/scue/p/3548661.html

Background lighting settings for the keyboard in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.