LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (http://www.linuxquestions.org/questions/arch-29/)
-   -   Strange keyboard behavior (http://www.linuxquestions.org/questions/arch-29/strange-keyboard-behavior-500338/)

VAS 11-10-2006 09:40 AM

Strange keyboard behavior
 
Sorry if a question is too simple to ask it here, but I really have no idea what to do.
I have just installed a system, and on virtual terminal the "Delete" key inserts the '~' symbol, I thought te problem could be in the inputrc file, but when I copied it from another system, where everything worked, nothing changed. Where can I read what to do?
The distro isn't Arch actually, but I think CRUX and Arch are very similar, and there is no topic for CRUX.

raskin 11-11-2006 07:28 AM

No, the question is not absolutely trivial. Also, if it is near-to-trivial, but search gives nothing, it should be fixed.

Run showkey. Press supposed Delete. Post keycode. See in /etc/sysconfig/console name of keymap, find it in /usr/share/kbd/keymaps/i386/qwerty/ , zcat it and post. Maybe it will be sufficient just to back up the file, gunzip it, put "Delete" as last word in line saying just "keycode <number> = ..." instead of what it was, and gzip back. Or "Remove".

VAS 11-11-2006 09:02 AM

Thanks, I tried to do so.
I've edited the 'us.map' and loaded it manually. There are some changes - now Delete works as Backspace, but it is said in /etc/inputrc:
"\e[3~": delete-char
---
Hmmm... And looking through man pages for keymaps and readline I found, that by default "\C-d" works as Delete should. But it's not so comfortable to use this keys combination.
---
And during theese experiments I got a new question - how can I find what escape-combination ("\e[3~" for example) the key generates? Is something like "showkey" for it?
---
my us.map after editing:
Code:

# us.map
keymaps 0-2,4-6,8-9,12
alt_is_meta
include "qwerty-layout"
include "linux-with-alt-and-altgr"
include "compose.latin1"
include "euro1.map"
strings as usual

keycode  1 = Escape
keycode  2 = one              exclam
keycode  3 = two              at              at              nul              nul
keycode  4 = three            numbersign
        control        keycode  4 = Escape
keycode  5 = four            dollar          dollar          Control_backslash
keycode  6 = five            percent
        control        keycode  6 = Control_bracketright
keycode  7 = six              asciicircum
        control        keycode  7 = Control_asciicircum
keycode  8 = seven            ampersand        braceleft        Control_underscore
keycode  9 = eight            asterisk        bracketleft      Delete
keycode  10 = nine            parenleft        bracketright
keycode  11 = zero            parenright      braceright
keycode  12 = minus            underscore      backslash        Control_underscore Control_underscore
keycode  13 = equal            plus
keycode  14 = Delete
keycode  15 = Tab
keycode  26 = bracketleft      braceleft
        control        keycode  26 = Escape
keycode  27 = bracketright    braceright      asciitilde      Control_bracketright
keycode  28 = Return
        alt        keycode  28 = Meta_Control_m
keycode  29 = Control
keycode  39 = semicolon        colon
keycode  40 = apostrophe      quotedbl
        control        keycode  40 = Control_g
keycode  41 = grave            asciitilde
        control        keycode  41 = nul
keycode  42 = Shift
keycode  43 = backslash        bar
        control        keycode  43 = Control_backslash
keycode  51 = comma            less
keycode  52 = period          greater
keycode  53 = slash            question
        control keycode  53 = Control_underscore
        control shift keycode 53 = Delete
keycode  54 = Shift
keycode  56 = Alt
keycode  57 = space
        control        keycode  57 = nul
keycode  58 = Caps_Lock
keycode  86 = less            greater          bar
keycode  97 = Control
keycode 110 = Insert
keycode 111 = Delete

Also I wanted to say that 'Insert', 'PgUp', 'PgDn' insert '~' too, and the string
keycode 110 = Insert
was useless somewhy...

I should apologize for theese questions, I've installed this distribution to study, and I want to find most answers on my own. I've searched a lot in the Internet, but it was nearly useless...

raskin 11-11-2006 12:07 PM

Well.. As a quick reply - if you complain about lack of information, there must be 'man keymaps'. Note - reading man page sometimes means reading its transitive closure. Also, maybe post dumpkeys output. And table of showkeys results for every key.
Also read man readline.


All times are GMT -5. The time now is 06:11 PM.