Letter 'd' won't work in terminal

Asked by cfg

Hello.

Very strange. I have no idea why, but all of a sudden the letter 'd' has stopped working in terminal (thus making "sudo" rather difficult to type).

I have found a couple of other instances online, but none of them seems to provide a solution.

I have checked keyboard shortcuts to see if something was accidentally assigned. Nothing.
I have "stty -a" to check there. Again, nothing.
Terminal -> reset and clear. Nothing.

I can create the letter "d" in terminal by control-v d, so I can sudo in the short term, but longterm that is annoying.

Has anyone else ever seen this or have an idea how to fix it?

Thanks!
CFG

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Simos Xenitellis 
Solved:
Last query:
Last reply:
Revision history for this message
B rabbit (justin--prince) said :
#1

i think you should borrow a new keyboard from somewhere and try it out and if it works than its fine,
just replace it with a new one...if it doesn't then go back to the basics and check all the keyboard options and narrow down the problem until u find it...:)

Revision history for this message
cfg (cfgold) said :
#2

Hi, thanks for the reply.

I tried that, too. Plugged in a new keyboard, but that didn't help. I am pretty sure it isn't a hardware issue, since "d" works in every other program, and I can get it to work in terminal with control-v d.
-c

Revision history for this message
Simos Xenitellis  (simosx) said :
#3

Quite strange.
Type "bind -p" in the shell. It should show you the keyboard bindings for the Bash shell.
For "d" (well, any other letter of the alphabet!) you should get

         "d": self-insert

Does "d" work in vim/emacs?

Revision history for this message
cfg (cfgold) said :
#4

Hello.
Thank you for the suggestion.

'd' works in vim/emacs. In fact, it seems to work in just about everything but terminal.

when I type "bind -p", it is strange, because it skips right over "d":
[snip]
"a": self-insert
"b": self-insert
"c": self-insert
"e": self-insert
"f": self-insert
[snip]
"D" is there, but not "d". When I scroll through the output of bind -p, it doesn't seem that there is anything bound to "d".

Any thoughts/suggestions?
Thanks,
C

Revision history for this message
Best Simos Xenitellis  (simosx) said :
#5

Run
       bind d:self-insert

and check if "d" works now.
If it works, add the above line in ~/.bashrc.

For this single letter to stop working something went wrong in the configuration files. I would be interesting if you could find out, such as run
     grep bind ~/.[a-z]*
and
     grep bind /etc/*

Revision history for this message
cfg (cfgold) said :
#6

Dear Simos,

Thank you. Your suggestion did the trick. I am still absolutely mystified as to why it stopped working.

As per your requests, maybe these can help make sense of it?
$ grep bind ~/.[a-z]*
didn't return anything.

$ sudo grep bind /etc/*
/etc/bash_completion:# bind completes with readline bindings (make this more intelligent)
/etc/bash_completion:complete -A binding bind
/etc/bash_completion: [[ "$( bind -v )" = *$1+([[:space:]])on* ]]
/etc/bash_completion: COMPREPLY=( $( compgen -W 'alias arrayvar binding \
/etc/bash_completion: ref tie tied untie use accept bind connect getpeername \
/etc/host.conf:order hosts,bind
Binary file /etc/ld.so.cache matches
/etc/ltrace.conf:string bindtextdomain(string, string);
/etc/mime.types:application/vnd.fujixerox.docuworks.binder
/etc/nanorc:# set rebinddelete
/etc/nanorc:# icolor cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>"
/etc/rpc:ypbind 100007
/etc/screenrc:# Commands in this file are used to set options, bind screen functions to
/etc/screenrc:# Remove some stupid / dangerous key bindings
/etc/screenrc:bind ^k
/etc/screenrc:#bind L
/etc/screenrc:bind ^\
/etc/screenrc:bind \\ quit
/etc/screenrc:bind K kill
/etc/screenrc:bind I login on
/etc/screenrc:bind O login off
/etc/screenrc:bind } history
/etc/screenrc:#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"
/etc/services:at-nbp 202/tcp # AppleTalk name binding

And that's it. Odd. Thanks once again,
C

Revision history for this message
MisterMarq (marqo7) said :
#7

This helped a lot! Mine did the same thing with the same letter, maybe an update did it?
I posted it as a bug but I got a reply email saying that my submissions status was put from New => Invalid.

But like I said, this did the trick!

Revision history for this message
McGarnacle (cameron-f-russ) said :
#8

Had the same prob with letter h. Fixed!!

Revision history for this message
yuvale (yuval-emek) said :
#9

Same here:
The character (capital) C didn't work in gnome-terminal and in xterm (it did seem to work in practically any other application including gedit, firefox, emacs, nautilus).
bind -p showed that it is the only alphanumeric character that doesn't appear as self-insert.
Adding an explicit bind in .bashrc solved the problem.

Still, it would be interesting to find out the cause for this problem (and to remove patch from .bashrc) ...