Map Caps_Lock to Ctrl in linux

Source: Internet
Author: User
In linux, Caps_Lock is mapped to Ctrl. I used debian7, which used to be gnome desktop. The system has settings for changing the keyboard layout. Before gnome collapsed once, it was replaced with openbox, and it can be used very well with a little configuration. However, the keyboard layout cannot be modified in the system... in linux, Caps_Lock is mapped to Ctrl. I used debian 7, which was a gnome desktop. The system has settings for changing the keyboard layout. Before gnome collapsed once, it was replaced with openbox, and it can be used very well with a little configuration. But I didn't find the keyboard layout changed in the system, so I searched for related blogs on the Internet to exchange ctrl and caps lock. http://www.2cto.com/os/201306/222522.html Inside. the content of the xmodmap file is like this [html] remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L move the left ctrl, caps lock switching, I found that the usage of caps lock is very low, and it is easy to accidentally press to the left ctrl after switching, resulting in incorrect case switching. So I tried to change [html] remove Lock = Caps_Lock remove Control = Control_R keysym Control_R = Caps_Lock keysym Caps_Lock = Control_R add Lock = Caps_Lock add Control = Control_R, caps lock and ctrl are both functions of ctrl. Run [plain] xmodmap ~ /. Xmodmap 2> run xmodmap in/dev/null. we can see that there is no change before the change. [html] shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x69) mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb) you can run the command every time you start the system, or you can write it as you did above. bashrc or other configuration files I use openbox desktop, which has In an autostart file, I wrote [html] # These things are run when an Openbox X Session is started. # You may place a similar script in $ HOME /. config/openbox/autostart # to run user-specific things. # If you want to use GNOME config tools... # if test-x/usr/lib/openbox/gnome-settings-daemon>/dev/null; then #/usr/lib/openbox/gnome-settings-daemon & # elif which gnome-settings-daemon>/dev/null; then # Gnome-settings-daemon & # fi # If you want to use XFCE config tools... # xfce-mcs-manager & tint2 & xmodmap ~ /. Xmodmap 2>/dev/null
Related Article

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.