How to get the Home & End keys working in Cygwin (RXVT)

Last year I blogged about how to get the Home & End keys working in remote Linux shells & terminals. Well now it's time to sort the Windows shell Cygwin out.

If your Home and End keys are producing funny characters on the command line rather than moving the cursor then the input codes of the keyboard need to be remapped.

Open your Cygwin terminal and create a file called .inputrc in your home directory, and add the following:

# Home Key

# End Key

# Delete Key

# Insert Key
Now edit or create .bashrc in your home directory and add the following line to ensure the above .inputrc file is picked up:
export INPUTRC=$HOME/.inputrc
To see if all the above has worked, reopen your cygwin terminal and try it out! If it doesn't work then just delete the .inputrc file and remove the line from .bashrc.

Technorati Tags: , , , , , , ,

1 comment:

Erik Henrique said...

Hello, Thank you for this!