Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-04-2009, 05:44 PM
|
#1
|
|
Member
Registered: Nov 2007
Location: Canada
Distribution: Slackware 12.0
Posts: 100
Rep:
|
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?
Any advice is appreciated,
Coto
|
|
|
|
06-04-2009, 10:12 PM
|
#2
|
|
Member
Registered: Jul 2005
Location: Iowa
Distribution: Slackware
Posts: 164
Rep:
|
Funny, I was working on this exact problem today, but then I got distracted. Haven't come up with a solution yet.
|
|
|
|
06-04-2009, 10:28 PM
|
#3
|
|
Member
Registered: Jul 2005
Location: Iowa
Distribution: Slackware
Posts: 164
Rep:
|
Well, one solution that I came up with to fix urxvt was creating a file in the home directory for my user:
Code:
~/.inputrc
"/e[7~": beginning-of-line
"/e[8~": end-of-line
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.
Last edited by rigelan; 06-04-2009 at 10:45 PM.
|
|
|
|
06-05-2009, 06:08 AM
|
#4
|
|
LQ Newbie
Registered: Jun 2009
Location: Prague/Czech Republic
Distribution: Slackware
Posts: 5
Rep:
|
Hi,
I had similar problem and added something like :
Code:
case "$TERM" in
rxvt*)
bindkey '\e[7~' beginning-of-line
;;
linux)
bindkey '\e[1~' beginning-of-line
;;
esac
to my ~/.zshrc. I didn't test if for bash, so please take it as a hint only ... (e.g. in bash bindkey->bind, I think)
Daniel
|
|
|
|
06-05-2009, 09:52 AM
|
#5
|
|
Member
Registered: Jul 2005
Location: Iowa
Distribution: Slackware
Posts: 164
Rep:
|
Thanks for the tip dangazda, unfortunately it looks as though bindkey doesn't work in bash.
I did end up with a fix for mine, by putting both keys into ~/.inputrc,
Code:
"\e[1~": beginning-of-line
"\e[7~": beginning-of-line
"\e[4~": end-of-line
"\e[8~": end-of-line
Because the key codes don't contradict one another and are completely independent, I can get away with this.
How is your problem looking cotobear?
|
|
|
|
06-05-2009, 10:12 AM
|
#6
|
|
Member
Registered: Jul 2005
Location: Iowa
Distribution: Slackware
Posts: 164
Rep:
|
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
Last edited by rigelan; 06-05-2009 at 11:20 AM.
|
|
|
|
06-06-2009, 01:40 PM
|
#7
|
|
Member
Registered: Nov 2007
Location: Canada
Distribution: Slackware 12.0
Posts: 100
Original Poster
Rep:
|
Hey rigelan,
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:
http://www.linuxfromscratch.org/blfs...s/inputrc.html
Thanks for your suggestions.
Coto
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:18 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|