1

I use my Raspberry Pi via SSH and the 'f' and 'b' keys do not work in the terminal (the 'F' and 'B' do work, though). Also, when I start a text editor vim/vi/nano, every key works. It seems to be a problem with the terminal itself. Does anyone know how I could fix this?

This is the output of uname -a:

Linux raspberrypi 4.4.15-v7+ #897 SMP Tue Jul 12 18:42:55 BST 2016 armv7l GNU/Linux
  • Are the keys bound to a command? What happens when you type the keys twice? – ott-- Jul 17 '16 at 18:42
  • Keys are not bound to a command and nothing happens if I type the keys twice or more. – tbb10 Jul 19 '16 at 17:36
  • I wonder if your system has xev installed (linux.die.net/man/1/xev). Start it and try the keys again. – ott-- Jul 19 '16 at 17:44
  • The problem seems to be gone though I'm not really sure what was the cause (Might have happened when I connected my Ardnuino to it... really don't know). I'll send feedback if it happens again. – tbb10 Jul 20 '16 at 22:12
1

Kind of weird. You might try raspi-config -- under Internationalization Options there is a means of setting the keyboard type.

Beware I think initially (or if after you choose "English"?) it shows only shows a variety of UK style layouts, none of which correspond to US ones; to see those you have to choose "other" first.

Most people on the west side of the Atlantic have a US style 104 key PC keyboard. You have to reboot for this to take effect (or you could try plugging and unplugging the keyboard, but I think a reboot is needed).

  • It tried to change keyboard layout and got this error after selecting to option change keyborad layout : update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults – tbb10 Jul 19 '16 at 17:41
  • Don't worry about that; it has to do with backward compatibility with the init system used in the first version of Raspbian. The keyboard setup should still work (although I noticed the last installs I did the boot process may hang on that for <= 90s the first time or so) -- but I can't promise it will fix your particular problem. – goldilocks Jul 19 '16 at 17:48
1

I found out years later, with a similar mistake, that the problem was due to a bad configuration of my .inputrc file.

The configuration was something like that : bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward'

There are two possible situation that could have happened :

  • I executed . .inputrc and forgot the ''
  • This bad configuration of the .inputrc was executed at login

For the second case not to cause an error, the syntax should have been : "\e[A": history-search-backward "\e[B": history-search-forward

The solution is to reset the key bindings with first : set -o vi to reset the binding for the 'b' and 'f' keys then set -o emacs to recover the nice EMACS bindings. Strangely I found out that set -o emacs alone would not reset the bad bindings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.