LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 12-31-2008, 11:34 AM   #1
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Rep: Reputation: 31
Delete key not working in terminal emulators


I am used to my delete key deleting the character at the current cursor position. Mine does this except in terminal emulators such as Konsole and xterm.

I'm on a Thinkpad T60 and Slackware 12.2. Here is the keyboard section of my xorg.conf

Code:
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
EndSection
I have tried different keyboard "themes" in Konsole and none of them work. I have tried different XkbModel choices too (pc104 and thinkpad60 to be specific). In everything but the terminal emulators the key works, but in a terminal all I see is a ~ when I press delete. BTW, Ctrl-D does do a delete.

I assume I must need an .Xmodmap entry for the key, but I'm not sure how to do this. Specifically, how do I determine what keycode my delete is generating? Or is there something else I should look at?
 
Old 12-31-2008, 11:52 AM   #2
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,490

Rep: Reputation: Disabled
Quote:
Originally Posted by statguy View Post
Specifically, how do I determine what keycode my delete is generating?
run xev and then press your delete key, and you'll see the keycode in the output.

BTW, my delete key works in all the terminal emulators and I didn't do anything to configure it.

Brian
 
Old 12-31-2008, 12:15 PM   #3
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by BCarey View Post
run xev and then press your delete key, and you'll see the keycode in the output.
Thanks, I'll try that.

Quote:
Originally Posted by BCarey View Post
BTW, my delete key works in all the terminal emulators and I didn't do anything to configure it.
Of course it does. I have a knack for odd problems even when I do a full install.
 
Old 12-31-2008, 01:31 PM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026
Try the following on the command line, after entering each cat|od command press
DEL enter ctrl-d. If your delete key is working you should get something similar to this.

Code:
bash-3.1$ echo $TERM
xterm
bash-3.1$ cat | od -tx1c
^[[3~
0000000 1b 5b 33 7e 0a
        033   [   3   ~  \n
0000005
bash-3.1$ cat -v | od -tx1c
^[[3~
0000000 5e 5b 5b 33 7e 0a
          ^   [   [   3   ~  \n
0000006
bash-3.1$
Not all tty based commands support line editing, so it might help if you give us a little more detail of what you're trying to run when it doesn't work, but the above will give us a clue that your key is at least generating reasonable control sequences.

You may also want to ensure your $TERM is set appropriately for the type of terminal you're using.

Last edited by GazL; 12-31-2008 at 01:32 PM.
 
Old 12-31-2008, 02:25 PM   #5
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by GazL View Post
Not all tty based commands support line editing, so it might help if you give us a little more detail of what you're trying to run when it doesn't work, but the above will give us a clue that your key is at least generating reasonable control sequences.

You may also want to ensure your $TERM is set appropriately for the type of terminal you're using.
Well, I did say it worked fine except for terminal emulators such as Konsole or xterm. That said, here are the results in a Konsole.

Code:
$ echo $TERM
xterm
$ cat | od -tx1c
^[[3~
0000000 1b 5b 33 7e 0a
        033   [   3   ~  \n
0000005
$ cat -v | od -tx1c
^[[3~
0000000 5e 5b 5b 33 7e 0a
          ^   [   [   3   ~  \n
0000006
Running this in a non-x tty gives the same results except the $TERM variable is linux.

When I saw that, I did

Code:
export TERM=linux
in my Konsole window and the Delete key behaves.

So, since I have the same problem in an actual xterm, does this mean there is a problem with the xterm terminal type for my system?

Should I therefore set TERM to linux in my .bashrc?
 
Old 12-31-2008, 02:51 PM   #6
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Just to follow-up. After the discovery that my delete key worked with TERM=linux I went into the Konsole configuration dialog. There is a spot to set the TERM variable. After some trial and error I determined that with $TERM=linux and the Keytab as XTerm (XFree 4.x.x) my keys work as intended.

Thanks for the suggestions that put me on this path.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: 13 Terminal Emulators for Linux LXer Syndicated Linux News 0 09-22-2008 11:00 AM
Delete key not working rameshmit07 Solaris / OpenSolaris 5 09-03-2008 03:35 AM
Delete key doesn't work on Gnome terminal in RedHat simbamford Linux - Newbie 2 11-26-2006 03:23 AM
Terminal emulators don't work in X pherthyl Linux - Software 1 03-12-2004 01:58 AM
Terminal Emulators Question ximiansavior Linux - Software 4 11-17-2003 07:07 AM


All times are GMT -5. The time now is 09:44 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