Exchange ctrl and capslock because the ctrl key is in the lower left corner of the notebook keyboard, it is a pain for people who often use the ctrl key. I searched the internet and found several methods for exchanging key locations. here I will record them. The first method is to use xmodmap. Create a new file ~ /. Xmodmap, add... switch ctrl and caps lock because the ctrl key is in the lower left corner of the notebook keyboard, it is a pain for people who often use the ctrl key. I searched the internet and found several methods for exchanging key locations. here I will record them. The first method is to use xmodmap. Create a new file ~ /. Xmodmap, add the following content: remove Lock = Caps_Lockremove Control = Control_Lkeysym Control_L = Caps_Lockkeysym Caps_Lock = Control_Ladd Lock = Caps_Lockadd Control = Control_L and then execute xmodmap ~ /. Xmodmap 2>/dev/null. If you do not want to manually enter the command for each startup, you can write the command ~ /. Xinitrc. Note that if you write the command ~ /. In bashrc, the above command is executed every time a new terminal or tab is opened, so that the key bit is changed back. Another method is to use the setxkbmap command. Run the following command: setxkbmap-option ctrl: swapcaps. You can also place the commands in ~ /. In bashrc, repeated execution is not affected. (Updated on February 02,) you can use the GUI option in gnome. Choose System> Preference> Keyboard> Layout> option... -> Ctrl key position, and select "Swap Ctrl and CapsLock. In addition to switching ctrl and caps lock, there are also exchanges with alt, so that you can use two thumbs to press ctrl and alt respectively (switching right ctrl and alt ): remove mod1 = Alt_Rremove Control = Control_Rkeysym Control_R = Alt_Rkeysym Alt_R = Control_Radd mod1 = Alt_Radd Control = Control_R why do you want to exchange the ctrl key? One day, when I was hanging out on the Internet, I accidentally saw this article, and suddenly I was so excited that I thought about how awesome emacs was with the right hand of vim. To show your determination to learn, install emacs and unload vim, which has been around for five years. It took a few weeks to touch the mouse. the deepest feeling was that the left-hand finger was too hard. even if we exchanged ctrl and caps lock, it was also very tired and painful to make a small finger in a day, so I used vim. If you are not motivated to learn about emacs, you can read the article above. if you have been using vim or have never used the two, try it. maybe you will fall in love with it. Even if it may be scared off, I believe it will get a lot from the learning process. for example, I can simulate several mobile location shortcuts in vim, it is convenient to switch the input method or enter characters in pairs such as brackets and quotation marks: "emacs-style key bindingsinoremap ^ Inoremap Inoremap Inoremap $ Inoremap Inoremap Inoremap Dinoremap Inoremap Inoremap Xpiinoremap Pa is even more exaggerated by changing the right ctrl and enter. after all, there are many times when using ctrl in emacs, and the enter can be replaced by ctrl-m and ctrl-j, in this way, the two fingers can open the bow left and right.
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.