Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 05-18-2006, 09:34 AM   #1
Registered: Jul 2003
Distribution: Slackware
Posts: 84

Rep: Reputation: 15
keyboard remapping?

My problem is this: I find that I hit the enter key above the right shift too often by mistake (usually when I hit the apostrophe). So I removed it and now I just use the keypad enter key, and I'm very satisfied. The only outcome that I'm not satisfied with is that some X apps treat the two keys differently; for example WindowMaker, my favorite WM, says that there is an 'Return' key and a 'KP_Enter' key. XTerm treats the two keys as a return, but RXVT will just beep on input of the keypad enter.
So what I want to know is "Is there a way to give the keypad enter key the same keycode as the regular return so that they act the same?" This doesn't need to work at the text console, since they are already treated the same there, so if this functionality is available in the X server there's no need for me to go any deeper than that. I just couldn't figure this one out on my own, but maybe one of you has the key .

Thanks a lot,
Old 05-19-2006, 04:19 AM   #2
Registered: Aug 2005
Posts: 235

Rep: Reputation: 30
man xmodmap
man dumpkeys
man loadkeys

Maybe someone else can help you in more detail
Old 05-20-2006, 10:27 AM   #3
Registered: Jul 2003
Distribution: Slackware
Posts: 84

Original Poster
Rep: Reputation: 15
Ok, I solved this one, I'll describe my solution here for anyone else wanting to know and for the benefit of general knowledge.

I already knew about the xmodmap command and the .Xmodmap file through trying to solve this one on my own. The dumpkeys command, however, was the missing link I needed to get to the solution. dumpkeys lists all the keycodes for any keyboard layout, and the keysyms that are open for your keyboard. keycodes are the numerical codes that represent which key you pressed, and keysyms are names that reference the keycodes (in my case, the only ones I needed to know were the ones for the two enter keys, "KP_Enter" and "Return"). It is possible to have one key use the same keycode as another within the .Xmodmap file by using a keysym line, in my case all I had to add was:

keysym KP_Enter = Return

And then I was in business!

So thanks again for the help, I hope that someone else looking for the same solution can find this post!


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
Keyboard Remapping under KDE unihiekka Linux - Hardware 5 10-09-2005 05:01 PM
keyboard remapping bicolano53 Linux - Newbie 1 09-21-2004 09:03 PM
Key remapping erickFis Slackware 0 02-12-2004 05:00 AM
Remapping keys - is it possible? LooseCanon Linux - General 2 09-03-2003 10:36 PM
Keysym remapping - keyboard shortuts in a shell: how to define modifiers? larus_marinus Linux - General 0 07-03-2003 09:52 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:04 PM.

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