Archlinux replaces F4 and Esc key positions

Vim is a classic editor under Linux. It is very easy to use. I have been using it all the time, but there is a problem. Every time I exit from the editing mode, I need to press the Esc key, but its position is relatively far. tired. I set the shortcut key to close the window to F4, and the shortcut key to open the terminal to F3. During use, I found that the wrong key was pressed in touch typing. At this time, instead of opening a new terminal window, I put other The window is closed (usually the browser), very depressed, after thinking about it, the position of the F4 and Esc keys should be swapped.

I searched the Internet for a long time, I don't know why, the xmodmap tool does not work under archlinux, so I need to take another way. After a long time of conflict, I finally solved the problem.

Edit the /usr/share/X11/xkb/keycodes/evdev file, exchange the key codes of the two keys <Esc> <FK04>, save it, and restart the machine.

Guess you like

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