Getting keyboard to function properly in rxvt/urxvt
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Getting keyboard to function properly in rxvt/urxvt
Hey everyone,
I have installed urxvt (rxvt was installed with the system).
Currently xterm properly uses the keyboard, that is, all the keys do what they should. However rxvt and urxvt both fail to use the home and end keys properly and instead produce a "~".
What is the best solution for this? Since the keyboard is functioning properly for xterm is it possible to link the settings that xterm uses to a file that urxvt/rxvt uses?
This makes it so that urxvt (rxvt-unicode) works when the HOME key and END key are pressed. It attaches the key "[7" to the command "beginning-of-line" and key "[8" to the command "end-of-line"
Unfortunately, it breaks the other terminal I use: the linux terminal on tty6, where the home and end keys stop working. In that terminal they use keys "/e[1~" & "/e[4~" respectively.
Does anybody have a solution that would make them both work properly? I will continue to look for one.
I changed something again. When I did the last command, it made home and end key work properly, but the page-down and page-up, and delete key stopped working. I think the ~/.inputrc completely replaces the commands in /etc/inputrc, instead of just adding to them. So I took the /etc/inputrc file, made a few changes to it, and copied it to ~/.inputrc. I didn't just make the changes in /etc/inputrc because it is part of a system file, and whenever I upgrade the package, the changes I placed in it would disappear.
-It might make sense for the package maintainer to make this change in /etc/inputrc.
Here is my latest ~/.inputrc (copied and changed from /etc/inputrc)
Code:
# /etc/inputrc - ~/.inputrc
# This file configures keyboard input for programs using readline.
# See "man 3 readline" for more examples.
# Configure the system bell. Options are none, visible, and audible.
#set bell-style none
# Enable 8 bit input.
set meta-flag On
set input-meta On
set convert-meta Off
set output-meta On
# Set various nice escape sequences:
"\eOd": backward-word
"\eOc": forward-word
# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# for rxvt #added
"\e[7~": beginning-of-line
"\e[8~": end-of-line
# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line
# for freebsd console
"\e[H": beginning-of-line
"\e[F": end-of-line
This has also worked for me. I tried just putting the keycodes in /etc/inputrc without luck. Copying /etc/inputrc to ~/.inputrc has solved the problem.
Additionally, a source for your (experimentally confirmed) idea that the local file replaces the global file:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.