maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Mapping keys? (https://talk.maemo.org/showthread.php?t=32747)

VulcanRidr 2009-10-13 01:00

Mapping keys?
 
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 2009-10-13 01:17

Re: Mapping keys?
 
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).

VulcanRidr 2009-10-13 12:53

Re: Mapping keys?
 
Quote:

Originally Posted by allnameswereout (Post 344964)
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.

Quote:

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...

VulcanRidr 2009-10-13 13:36

Re: Mapping keys?
 
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?

VulcanRidr 2009-10-13 16:35

[Solved] Re: Mapping keys?
 
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 2009-10-22 20:53

Re: Mapping keys?
 
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.

allnameswereout 2009-10-22 21:28

Re: Mapping keys?
 
Quote:

Originally Posted by VulcanRidr (Post 345342)
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.

qole 2009-10-22 22:26

Re: Mapping keys?
 
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?

allnameswereout 2009-10-22 22:34

Re: Mapping keys?
 
Quote:

Originally Posted by qole (Post 355966)
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).

qole 2009-10-22 22:43

Re: Mapping keys?
 
Of course I rebooted.

GeneralAntilles 2009-10-22 22:53

Re: Mapping keys?
 
Quote:

Originally Posted by qole (Post 355977)
Of course I rebooted.

Tried every method I could think of here, couldn't get anything to work. Something weird with the new HAL system, maybe.

twoboxen 2009-11-25 19:49

Re: Mapping keys?
 
Quote:

Originally Posted by qole (Post 355966)
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?

Some worked for me, others didn't. What keys were you trying to map?

I was able to map pipe, but I couldn't get tab, tilde, or escape to work.

qole 2009-11-25 21:46

Re: Mapping keys?
 
Getting the keyboard remapped on the N900 is the bane of my existence. Let's continue that conversation over here.

Addison 2009-12-05 23:51

Re: Mapping keys?
 
Quote:

Originally Posted by allnameswereout (Post 355916)
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.

Newb question. Is Xmodmap only for figuring out hardware keys and mapping them?

I'd like to see what signals are being sent with both hildon keyboard and Xkbd keys on a N8x0.

Is this possible? If so, what would be the command line in doing that?


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

vBulletin® Version 3.8.8