Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm constantly on bash via ssh, on a computer that doesn't have X. In my computer I've switched the keyboards' Super and Alt keys with xmodmap.

Is it possible to do it on the computer in which I log in? It's running Debian Lenny.

Update: Is there an equivalent for xev too? I tried doing

loadkeys ~/.loadkeys

where ~/.loadkeys contained:

keycode 133=0xffe9

keycode 64=0xffeb

But it seems that loadkeys doesn't accept hexagesimal literals, since it fails with the message:

Couldnt get a file descriptor referring to the console

KDGKBMODE: Bad file descriptor

loadkeys: error reading keyboard mode

I also tried

keycode 133=64

keycode 64=133

In which format should the new mapped key value (value in the right) be?

share|improve this question

migrated from serverfault.com Sep 8 '12 at 8:00

This question came from our site for professional system and network administrators.

    
Bash is a shell. You should be looking at changing your terminal emulator. Are you connecting via putty, the local console, or something else? –  Zoredache Mar 8 '12 at 21:45
    
@Zoredache, I use gnome-terminal. –  kmels Mar 8 '12 at 21:49
    
Are you using Gnome-terminal or the Linux console then? Your comment and your question are contradictory. –  Gilles Sep 8 '12 at 13:16

1 Answer 1

up vote 4 down vote accepted

The console equivalent is loadkeys. The key codes can be found with showkey. See: The Linux keyboard and console HOWTO

share|improve this answer
    
Thanks for your answer Mircea, I read the loadmap manual but I can't find the proper way to find the syntax and new key value format, so I edited the question. –  kmels Mar 8 '12 at 21:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.