Posts: 473 | Thanked: 141 times | Joined on Jan 2009 @ Virginia, USA
#1
I'm trying to map keys on my keyboard, specifically [, ], |, <Esc> and a few others. I looked in some of the threads here, and it said adding /home/user/.Xmodmap should do it.

However, in my home directory, I have the .Xmodmap I cut and pasted from the thread, plus I have a .Xmodmap-keymap, and a .Xmodmap-keymap-n800 and .Xmodmap-keymap-n810. I checked both .Xkeysym BackSpace = BackSpace BackSpace Tabmodmap-keymap and .Xmodmap-keymap-n810, and both have

Code:
keysym period = period greater bar
keysym BackSpace = BackSpace BackSpace Tab
keysym comma = comma less Escape
and so forth. However, when I hit <Fn>comma, I get a comma. Is the keymap just not being activated when I open osso-xterm? Do I need to add this to my .bashrc to enable? Also, what is the keycode for [ and ]?

ideas?
--vr
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#2
I think it only reads ~/.Xmodmap and not ~/.Xmodmap*

I'm not sure why you think it'd read ~/.Xmodmap*

I think you'll need to specify those. And the last one counts. So if you first bind Esc to A, and then later bind Esc to Z, while in your last config file you bind Esc to B, it will be bound to B; not A or Z.

You can keep backups e.g. ~/.Xmodmap.orig so I think what you do best is merge the ~/.Xmodmap* into 1 (one) ~/.Xmodmap and understand the various settings.

The command xmodmap has a verbose option, and there is also the command xev(1) which prints contents of X events. You can read xmodmap flags by executing xmodmap -help.

You can specify a different settings file to be loaded by executing xmodmap ~/.Xmodmap_blah (where ~/.Xmodmap_blah is an example, I recommend making the filenames descriptive for example 2009_10_12_23 (year_month_day_hour) or something like that).
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 473 | Thanked: 141 times | Joined on Jan 2009 @ Virginia, USA
#3
Originally Posted by allnameswereout View Post
I think it only reads ~/.Xmodmap and not ~/.Xmodmap*

I'm not sure why you think it'd read ~/.Xmodmap*
Mainly because before I created the .Xmodmap file, the only ones in $HOME were .Xmodmap-keymap and the two .Xmodmap-keymap-n8?0 files.

I think you'll need to specify those. And the last one counts. So if you first bind Esc to A, and then later bind Esc to Z, while in your last config file you bind Esc to B, it will be bound to B; not A or Z.

You can keep backups e.g. ~/.Xmodmap.orig so I think what you do best is merge the ~/.Xmodmap* into 1 (one) ~/.Xmodmap and understand the various settings.

The command xmodmap has a verbose option, and there is also the command xev(1) which prints contents of X events. You can read xmodmap flags by executing xmodmap -help.

You can specify a different settings file to be loaded by executing xmodmap ~/.Xmodmap_blah (where ~/.Xmodmap_blah is an example, I recommend making the filenames descriptive for example 2009_10_12_23 (year_month_day_hour) or something like that).
Okay. so there is a hard- or soft coded default somewhere, and you have to override it.

Thanks for the iinfo...
 
Posts: 473 | Thanked: 141 times | Joined on Jan 2009 @ Virginia, USA
#4
Here is another interesting fact, I cannot seem to find the xmodmap command. apt-cache search xmodmap returns an empty result, meaning it is not found. On my Debian desktop, it returns:

Code:
[vulcanridr@defiant tmp]$ apt-cache search xmodmap
xkeycaps - manipulate X11 keymaps (for xmodmap) graphically
python-mmkeys - Multimedia key support as a PyGTK object
x11-xserver-utils - X server utilities
Does this mean keys can only be mapped in, for instance, easy-debian, but not in normal hildon osso-xterm sessions? Or can xmodmap be installed in easy-debian but be executed from hildon, similar to gimp, alsa-mixer and openoffice?
 
Posts: 473 | Thanked: 141 times | Joined on Jan 2009 @ Virginia, USA
#5
Okay, I figured it out. First of all, you make the modifications directly to /usr/share/X11/xkb/symbols/nokia_vndr/rx-44.

The four columns are, as far as I can tell, <unshifted>, <shift> <function> and <shift><function>.

I made the changes and now have all of the functions...I can play Angband and all...

Thanks all for your help.

--vr
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#6
Hi VulcanRidr,

Just saw this thread, while trying to figure out how to remap the N900 keyboard. If you want to use Xmodmap on the N810, you do have to run it via Easy Debian. Those .Xmodmap-keymap-n8?0 files are from Easy Debian. But if you map the keys with the ED Xmodmap, it should also work in Maemo. The good thing about Xmodmap is that the mappings are temporary. But if you don't mind making your mappings permanent, then xkb is the way to do it.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#7
Originally Posted by VulcanRidr View Post
Here is another interesting fact, I cannot seem to find the xmodmap command. apt-cache search xmodmap returns an empty result, meaning it is not found. On my Debian desktop, it returns:

Code:
[vulcanridr@defiant tmp]$ apt-cache search xmodmap
xkeycaps - manipulate X11 keymaps (for xmodmap) graphically
python-mmkeys - Multimedia key support as a PyGTK object
x11-xserver-utils - X server utilities
Does this mean keys can only be mapped in, for instance, easy-debian, but not in normal hildon osso-xterm sessions? Or can xmodmap be installed in easy-debian but be executed from hildon, similar to gimp, alsa-mixer and openoffice?
Hey, sorry for late rpely didn't see earlier. For the record: x11-xserver-utils is the package with xmodmap, and it seems xkeycaps is a graphic utlity to mod. You can also use xev which is very useful to find out what the value is for each key.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 

The Following User Says Thank You to allnameswereout For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#8
Interesting!

Changing the /usr/share/X11/xkb/symbols/nokia_vndr/rx-51 file doesn't remap the N900's keyboard.

Wonder what I'm doing wrong?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#9
Originally Posted by qole View Post
Interesting!

Changing the /usr/share/X11/xkb/symbols/nokia_vndr/rx-51 file doesn't remap the N900's keyboard.

Wonder what I'm doing wrong?
You need to rload that file with setxkbmap, xkbcomp, or restart X (ie. reboot).
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#10
Of course I rebooted.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:55.