OpenBSD 3.8 Home/End Keys Misbehaving
I know this question has been asked a million times, but despite my best attempts to squash it, the problem persists. I just installed OpenBSD 3.8 on a server and every press of Home or End results in "~". I've tried using the .inputrc file with these lines:
"\e[3~": delete-char "\e[1~": beginning-of-line "\e[4~": end-of-line But I still get (mostly) no love; delete now works, but Home and End still do not. I'm using Bash 3.0.16p1, but the issue also manifests when using the default ksh that comes with OpenBSD 3.8. Thanks very much for any advice you can come up with (aside from just using C-a and C-e, of course). :) Other details: keyboard is PS/2 104 key EN_US map; console is vt220; anything else needed, please ask. |
I have the same problem. I haven't found a fix but it is strange it doesn't happen in xterm just in rxvt and the cli.
I now know rxvt uses readline so the lines you put in inputrc might work for me, will test. But what does xterm use? |
Taylor checkout bsdforums.org if you haven't already. I had some questions when I installed 3.8 and everything works fine now (although I "upgraded" to 3.9 when it came out.)
Sorry I can't remember exactly what to look for but there aren't many posts in the openbsd forum, you should be able to find it. If not let me know and I'll see what I can find. |
Well some things I discovered. I changed my /etc/terminfo. Slackware has /etc/{terminfo;terminfo-BSD;terminfo-Linux}. Using the BSD one made one difference: both End and Home now produce ~. My old terminfo and the terminfo-Linux only affect the End key (produces ~).
|
Hi Workman,
On Slackware I also use a keymap for emacs from /usr/share/kbd/keymaps. Did you mean termcap or terminfo? |
Why do we need to use different keymaps for Slackware to work??? :'( Why can't everything use damn English if my locale is English!?
How do you set this keymap separate for each app? I mean termcap. Even Eterm uses it :S You use Slackware too, right? What's your status with all this trouble? So far, I haven't found any fix. |
Quote:
I set the keymap globally in startup by making a symlink from /etc/rc.d/rc.keymap to the emacs keymap in the path i mentioned in the last post. I don't see any termcap in my /etc but I only have terminfo. Doing this and what advice I got in bsdforums.org fixed my problems in Slackware and OpenBSD. Maybe search here for the woodsman's posts because I think his site was the one where I got the information and I didn't use it exactly but I figured out what I needed to do from it. I'm sorry I can't remember. There will be a thread with us discussing something similar, I hope it will also fix your problem. edit: here is the link I was talking about: http://www.linuxquestions.org/questi...keyboard+emacs I am still checking to see if there's any other info. |
Maybe I misunderstood you guys. I did get Home to work in console (I don't use it, it just worked after the other changes I made) but End doesn't work. I really don't care since bash shell uses either emacs or vi key commands- to get to the end of the line you do control e in bash (default) and since I use emacs I'm used to doing it this way and for me it's actually faster. If you prefer vi you can set bash to use vi-style control keys.
I wish I could paste text in this forum using control Y but when I do that nothing happens :p I guess next time I should get coffee before trying to answer. Why do we need different keymaps? Because there are many different keyboard types. And not all have keys in the same place on the keyboard. Try writing an ncurses app and you can see the wierd key codes you get in different terminals and console for the same key :( |
Quote:
Argh, I wish Slackware was as easy as Gentoo! Maybe I should go back to Gentoo... or Arch! Dammit! Sorry for my cursing but I can't stand it anymore! I'm using Slackware cause it's the most stable (not so patched) distro there is and I care for stability and software that works as the creators intended(vanilla). |
Quote:
Does this thing you did for Emacs solve all console problems including vi/vim/jed? |
Quote:
First take a look at /etc/inputrc like Taylor mentioned and I mentioned in the post I linked. I took almost everything out of mine since it all looked bad. Of course cp inputrc inputrc.bkup or something before you change it so you can recover if you mess up. Log off, log on, test. This may fix all your problems (even though it didn't for us :p) Next look through that list of keyboards I mentioned earlier in the thread and then just try a few keyboard layouts. You don't have to reboot to make this work, just set the keyboard layout as root. Here's my script: Code:
#!/bin/sh To find out which keymap you want, when you are testing open a root terminal and do: Code:
/usr/bin/loadkeys nameofyourkeymap.gz Do man bash or info bash and look into how to set the environment to vi-style commands if you don't like emacs-style. I didn't have to do this because emacs style is the default. I don't know what I was looking at when I answered about the termcap/terminfo. On my system there are several termcaps, no terminfo. I can't tell if I modified any of them. Sorry and I will never write about this topic again :p I don't use any of the vi editors so I can't answer your question. But my keyboard now works like I want for emacs in x terminals and console. |
What's the difference, vi-style commands and emacs-style commands?
Even if you don't use vi, it is a required package for Slackware. I never (ever) even looked at what Emacs is or looks like. I just go for the simplest thing, a good programming editor and that's it. (I know emacs is more than an editor). Thank you for your help. I will read your posts soon, cause I'm too busy right now. |
Quote:
What's the difference between vi-style commands and Emacs commands? I don't know, because I don't know Vi. When I want to go to the end of a line in Emacs I press C-e. When I want to go to the beginning of a line, I press C-a. When I want to go to the beginning of a file I press Alt-LeftShift-< The point is that bash is set up for guys who use Emacs or vi so that whatever keys you use in your editor you can use on the command line (within reason). So I don't have problems with home and end keys because I don't use them. |
Quote:
|
I haven't compiled a kernel on Slackware but I have installed several Slackware machines without vi and they all work :p
|
Quote:
All this trouble and frustration makes me want to go back to Gentoo... too bad I don't have another machine so I can use Gentoo as a reference for this terminal problem... and Gentoo 2006.1, the second release of this year, has gcc 4.1 (IIRC) and lots of improvements... because of the way it is designed, Gentoo will always be on top when it comes to new technologies and new software/features... Maybe I'll give it another try... |
All times are GMT -5. The time now is 09:18 PM. |