LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 05-09-2008, 09:03 AM   #1
krose
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Rep: Reputation: Disabled
"s" "d" and "f" don't type in console


In zsh everything types just fine. However, in all other shells (bash, mysql, etc), and in the non-X console, the lower-case "s", "d" and "f" keys won't type. I only noticed this when trying to do some work in mysql (pretty tough without those three keys), and it must have worked at some point or I would have had a hard time switching to zsh (note the s). I switched to a dvorak layout (via the gnome keyboard app) and the "s", "d" and "f" keys still wouldn't type (though they were mapped to other physical keys).

I'm running gnome in Heron on a Dell D620 laptop.

Any ideas appreciated. I don't know where to start and I'm not getting very far googling for "s", "d" and "f" or "keys won't type".
 
Old 05-09-2008, 03:13 PM   #2
Cogar
Senior Member
 
Registered: Oct 2005
Location: It varies, but usually within 100 feet of a keyboard.
Distribution: Fedora 10, Kubuntu 8.04, Puppy 4.1.2, openSUSE 11.2
Posts: 1,126

Rep: Reputation: 51
You might try plugging in a separate keyboard via the USB port, which will determine whether the keyboard in your laptop is starting to go (or has gotten contaminated). Is it a hardware problem? Hard to say. Still, keyboards (and mice) do wear out and I have seen some of them do some very unexpected things when they are in the process of "going." Good luck in any case.
 
Old 05-09-2008, 04:36 PM   #3
krose
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: Disabled
I'll give that a try, but I don't think that's it for three reasons:

First, these three letters always work fine in zsh, and always don't in bash and mysql. This is consistent in both X and at the system console. It's also consistent whether I change /etc/passwd and login in bash and then start a zsh session (via a script since I can't type an "s" while in bash), or login in zsh and then start a bash session.

Second, changing to a dvorak keyboard layout still had a problem with "s", "d" and "f", even though these letters were mapped to different physical keys.

Third, there's never a problem with captital "S", "D", or "F" -- only with the lower case letters.

Wierd, huh? I'm pretty sure it's due to some software keymapping that's incorrect but being corrected by zsh. However, I don't know where to start looking for this.

Thanks though.
 
Old 05-17-2008, 12:17 PM   #4
krose
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: Disabled
Still have console problem

Haven't figured this out yet. Any ideas??
 
Old 05-17-2008, 12:21 PM   #5
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
What do showkeys and xev say about system's comprehension of your keystrokes?
 
Old 05-19-2008, 09:31 AM   #6
krose
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: Disabled
I created executable scripts for "xev" and "showkey" since I can't type these without an "e" key! For each of these tests I typed "s", "d", and "f" in succession. The "showkey" tests were conducted in a console via ctrl-alt-f1, and the xev were in a terminal window in X.

Sorry for the lengthy paste that follows.:

showkey produces the same output under zsh and bash, except that letters appear when typed in zsh but NOT in bash:

Code:
0x9c 
0x1f 
0x9f 
0x20 
0xa0 
0x21 
0xa1
xev under zsh. Letters DO appear when typed:

Code:
KeyPress event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 3741141, (192,24), root:(235,380),
    state 0x0, keycode 39 (keysym 0x73, s), same_screen YES,
    XLookupString gives 1 bytes: (73) "s"
    XmbLookupString gives 1 bytes: (73) "s"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 3741268, (192,24), root:(235,380),
    state 0x0, keycode 39 (keysym 0x73, s), same_screen YES,
    XLookupString gives 1 bytes: (73) "s"
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 3742722, (192,24), root:(235,380),
    state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
    XLookupString gives 1 bytes: (64) "d"
    XmbLookupString gives 1 bytes: (64) "d"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 3742836, (192,24), root:(235,380),
    state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
    XLookupString gives 1 bytes: (64) "d"
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 3744238, (192,24), root:(235,380),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XmbLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 3744363, (192,24), root:(235,380),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False
xev under bash. The same except for times, though letters DON'T appear:

Code:
KeyPress event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 4030078, (166,-9), root:(220,347),
    state 0x0, keycode 39 (keysym 0x73, s), same_screen YES,
    XLookupString gives 1 bytes: (73) "s"
    XmbLookupString gives 1 bytes: (73) "s"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 4030178, (166,-9), root:(220,347),
    state 0x0, keycode 39 (keysym 0x73, s), same_screen YES,
    XLookupString gives 1 bytes: (73) "s"
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 4030709, (166,-9), root:(220,347),
    state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
    XLookupString gives 1 bytes: (64) "d"
    XmbLookupString gives 1 bytes: (64) "d"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 4030827, (166,-9), root:(220,347),
    state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
    XLookupString gives 1 bytes: (64) "d"
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 4031360, (166,-9), root:(220,347),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XmbLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2600001,
    root 0x5d, subw 0x0, time 4031486, (166,-9), root:(220,347),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False
 
Old 05-19-2008, 03:53 PM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Hm, what is your locale and $TERM? Keycodes seem correct..
 
Old 05-20-2008, 12:22 PM   #8
krose
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: Disabled
Same for zsh and bash:

Code:
locale

LANG=en_US.UTF-8
LC-CTYPE="en_US.UTF-8"
LC-NUMERIC="en_US.UTF-8"
LC-TIME="en_US.UTF-8"
LC-COLLATE="en_US.UTF-8"
LC-MONETARY="en_US.UTF-8"
LC-MESSAGES="en_US.UTF-8"
LC-PAPER="en_US.UTF-8"
LC-NAME="en_US.UTF-8"
LC-ADDRESS="en_US.UTF-8"
LC-TELEPHONE="en_US.UTF-8"
LC-MEASUREMENT="en_US.UTF-8"
LC-IDENTIFICATION="en_US.UTF-8"

echo $TERM

xterm
 
Old 05-20-2008, 12:50 PM   #9
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
I fail to see what is wrong.. And if you write a C program to read from console, and run it from bash and from zsh, does it read the sdf letters?
 
Old 05-30-2008, 10:59 PM   #10
krose
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: Disabled
I wrote a simple python program:
Code:
print raw_input()
and a simple C program:
Code:
#include <stdio.h>
main() { 
  while(1) {
    printf("%c\n", getchar());
  }
}
In both cases, the programs function just the same in zsh and in bash. In fact, then running these programs in the bash shell, the "s", "d" and "f" keys appear when typed, and again when printed back to stdout. After exiting the programs the "s", "d" and "f" keys again fail to appear (or have any affect) when in the bash shell (or other interactive shells like python or mysql).
 
Old 05-31-2008, 12:32 AM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Could you try to update/downgrade ncurses/termcap/terminfo/readline packages? The main idea is to have a package downloaded and hash-checked.. Looks like console description files got corrupted or something like that... Some checks maybe worth trying:
Code:
TERM=dumb bash
- should suppress intelligence being applied to trating console input.
Code:
cat ~/.inputrc /etc/inputrc
- to look if your readline settings are far from sane (bash, mysql, python.. use readline; zsh uses zle - its own command-line editor - to make possible its slightly-smarter-than-bash-until-something-fails sompletion; your programs used direct stdin reading without processing and it seems to work). Install rlwrap and run
Code:
rlwrap ./your-program
(your program should now read and print lines in loop until EOF, somewhat like cat). If it adds input history to your program but kills ‘‘s’’ key, readline/ncurses is in charge. Also try cat - how does it react on the broken keys? And when rlwrapped?
 
Old 05-31-2008, 12:42 AM   #12
AbsoluteMonkey
Member
 
Registered: Mar 2004
Location: Boston
Distribution: Fedora Core 10
Posts: 58

Rep: Reputation: 15
I bet it's your font. Change the font for your shell. Sounds weird I know. I have a similar problem with an IBM windows machine. A certain program running on it wouldn't take a quote or double quote in an input field unless you typed the key three times, then the quotes would show up. Come to find out, the font somehow doesn't like the graphics card.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM
Any way to get "Alice"; "Call of Duty" series and "Descent 3" to work? JBailey742 Linux - Games 13 06-23-2006 02:34 PM
<input type="button" disabled="true" > does not work in ns4.7 or 4.9 cybercop12us Programming 2 11-29-2002 09:31 AM


All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration