LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Bash, some keys acting strange (https://www.linuxquestions.org/questions/linux-software-2/bash-some-keys-acting-strange-751449/)

i92guboj 08-31-2009 05:38 AM

Bash, some keys acting strange
 
This started happening some time ago, and I have no idea where to look to diagnose it (other than the places that I've already looked into).

The problem is that when I am in bash some keys don't fulfill their intended purpose, instead they only print a tilde character, like this: '~'

These keys are: Insert, End, PageUp, PageDown. Del and Home still work ok.

Some notable things are:
  • this happens regardless I have a bashrc file or not, moving it out of scope makes no difference, however...
  • it only happens with my regular user, the root shell works ok
  • it only happens in bash. If I enter, let's say, mc or nano, these keys work ok. In X they work ok. In any other shell, like busybox or zsh they work ok. It's only bash, and only with my user.
  • it happens regardless of the terminal emulator I use, and it happens outside X in pure console as well

Any idea at all where to look? This has been bothering me for quite some time now and I have no idea what else to do.

Any pointer is appreciated, thanks for reading :)

catkin 08-31-2009 05:49 AM

What do PgUp and PgDn do when they are working in bash? At the command prompt mine just beep.

Edit: [DELETE]What sort of terminals are you experiencing this behaviour in? Have you tested in the Ctrl+Alt+F1 to F6 terminals?[/DELETE]

i92guboj 08-31-2009 06:24 AM

Quote:

Originally Posted by catkin (Post 3663745)
What do PgUp and PgDn do when they are working in bash? At the command prompt mine just beep.

Nothing as far as I know, unless in conjunction with shift, and that still works for me. That's more an anecdotal issue, not a true problem.

I am more concerned about the End and Insert keys, it's quite annoying when you are editing commands and you press one of them, and instead of doing their job they print a silly '~'.

Quote:

Edit: [DELETE]What sort of terminals are you experiencing this behaviour in? Have you tested in the Ctrl+Alt+F1 to F6 terminals?[/DELETE]
Yup.

catkin 08-31-2009 06:45 AM

When you say "only with my user" does that mean you have tried creating another user and that works as expected? If so, have you tried progressively replacing that user's user-specific bash initialisation files with your own -- ~/.bashrc, ~/.bash_profile, ~/.bash_login, and ~/.profile?

Is the problem affecting both login shells and non-login shells?

Do you have an ~/.inputrc file?

Have you tried stty sane?

i92guboj 08-31-2009 06:52 AM

Quote:

Originally Posted by catkin (Post 3663794)
When you say "only with my user" does that mean you have tried creating another user and that works as expected? If so, have you tried progressively replacing that user's user-specific bash initialisation files with your own -- ~/.bashrc, ~/.bash_profile, ~/.bash_login, and ~/.profile?

Yes. As said, I already tried moving all the initialization files out of scope, that didn't change a thing. I tried other user, and root, both ok.

Quote:

Is the problem affecting both login shells and non-login shells?
Yes. As said, it does the same regardless if I use a terminal emulator or if I login in pure console.

Quote:

Do you have an ~/.inputrc file?
Yes, and erasing it solves the problem. You hit the nail here. I forgot about it. However I'd really like to get the functionality back, so I will have to investigate why is it screwing my keyboard settings.

In that file I only had this:

Code:

set completion-ignore-case On
I've had case-agnostic completion for a long time without problems. So I must assume that something changed in the latest bash releases. I'll have to investigate about that.

But, thanks for pointing me in the right direction. I should have asked before. Thank you.


All times are GMT -5. The time now is 09:33 PM.