Bootstrap FreeKB - Linux Fundamentals - Resolve home and end keys not working
Linux Fundamentals - Resolve home and end keys not working

Updated:   |  Linux Fundamentals articles

I once had an issue where the home and end keys stopped working when connected to a Linux system. This happened after I create /home/john.doe/.inputrc file.

[john.doe@localhost ~]$ cat /home/john.doe/.inputrc 
set enable-bracketed-paste off

 

There are two inputrc files, /etc/inputrc which is the global system wide inputrc file and /home/username/.inputrc which takes precedence over the global /etc/inputrc file for a specific user, john.doe in this example. I noticed that the global /etc/inputrc file had the following, where "\e[1~" means that the home key should bring your cursor to the beginning of the line and "\e[4~" should bring your cursor to the end of the line.

[john.doe@localhost ~]$ cat /etc/inputrc 
"\e[1~": beginning-of-line
"\e[4~": end-of-line

 

So, the fix was simple. I could have either deleted /home/john.doe/.inputrc or I could have added the following to /home/john.doe/.inputrc.

[john.doe@localhost ~]$ cat /home/john.doe/.inputrc 
set enable-bracketed-paste off
"\e[1~": beginning-of-line
"\e[4~": end-of-line

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter deb9fa in the box below so that we can be sure you are a human.