maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   xmodmap not working on n900 (https://talk.maemo.org/showthread.php?t=35101)

白い熊 2009-11-25 19:16

xmodmap not working on n900
 
Hmmm, so the fun starts.

I've compiled xmodmap on board the N900. It's not functional. If I try a simple key remap, the key gets probably captured, since it doesn't type anymore, but the replacement key doesn't get echoed...

BTW, I was surprised to find out that xmodmap doesn't exist even in the SDK repository for the N900.

Anyone know what's up?

debernardis 2009-11-25 19:34

Re: xmodmap not working on n900
 
Though I can't help since I've no device yet, I'm curious: did you also compile xev? Does it work?

白い熊 2009-11-25 19:40

Re: xmodmap not working on n900
 
I used qole's xev from here: http://talk.maemo.org/showpost.php?p...5&postcount=21

It works. It's a little clumsy, since every window is full screen on the N900, so you have to click back and forth, but you can determine key codes this way.

This xmodmap is a bugger though, I've never met a problem with it of this kind on any device, so am thinking what could be causing it, especially since I compiled it natively, not even in scratchbox...

I'm kinda surprised negativelly a little by the N900's non-readiness to be used by a GNU/Linux poweruser, seems it's gonna take a lotta effort to get it into a useable state...

白い熊 2009-11-25 20:34

Re: xmodmap not working on n900
 
I mean there is that damned busybox, which doesn't enable onboard development, since it has non-required grep etc. But the busybox cannot be easily replaced by GNU utilities, since it conflicts with grep sed bison and so on and on, so when you try and install GNU utilities you would render your system unuseable, as it'd install half of Nokia proprietary stuff and the phone would stop working...

So, surprisingly though this should be a GNU power phone, it might not be that way until some serious hacking...

qole 2009-11-25 22:13

Re: xmodmap not working on n900
 
Getting the keys remapped on the N900 is the bane of my existence right now.

I can get a temporary remap using the technique described here.

Quote:

Originally Posted by Marius Gedminas

I've had partial success by doing this:

$ xkbcomp :0 default.xkb
$ vi default.xkb

comment out the two rules that cause syntax errors:

// interpret AccessX_Enable+AnyOfOrNone(all) {
// action= LockControls(controls=);
// };

// interpret MouseKeys_Accel_Enable+AnyOfOrNone(all) {
// action= LockControls(controls=);
// };

Now you can restore the settings back by running

$ xkbcmp default.xkb :0

if you screw up and end up with a nonfunctional keyboard.

Next

$ cp default.xkb mg.xkb
$ vi mg.xkb

key <RGHT> {
type= "PC_FN_LEVEL2",
symbols[Group1]= [ Right, Tab ]
};

$ xkbcomp mg.xkb :0

and now Fn+Right arrow is a Tab key.

Sadly I don't know enough about xkbcomp to see if it's possible to make it load incomplete maps on top of the current configuration, just to update a few symbols without replicating the full configuration.


EDIT: That xev is not mine, it is qwerty12's. And the problem that is exposed with xev (and my LXDE on Xephyr project) is that every window has to explicitly call XSetInputFocus() to grab the keyboard, otherwise the keystrokes don't go to that window.

白い熊 2009-11-25 22:58

Re: xmodmap not working on n900
 
Quote:

Originally Posted by qole (Post 392504)
the problem that is exposed with xev (and my LXDE on Xephyr project) is that every window has to explicitly call XSetInputFocus() to grab the keyboard, otherwise the keystrokes don't go to that window.

Damn it! I suspected something of this sort, after I stumbled upon your post with the xev, and experienced some related strange keyboard happenings.

This is the crux of my efforts since getting the phone today...

twoboxen 2009-11-25 23:01

Re: xmodmap not working on n900
 
Quote:

Originally Posted by qole (Post 392504)
Getting the keys remapped on the N900 is the bane of my existence right now.

I responded to you in another thread... I had SOME success editing the rx-51 file. What keys are you trying to map?

qole 2009-11-25 23:43

Re: xmodmap not working on n900
 
I remap several keys:
sterling -> bar
euro -> asciitilde
Fn-Right -> tab

Nothing works if I change the /usr/share/X11/xkb/symbols/nokia_vndr/rx-51 file. If I make the same changes to a custom qole.xkb file and then

sudo xkbcomp qole.xkb :0

I'm good to go until my next reboot.

白い熊 2009-11-25 23:45

Re: xmodmap not working on n900
 
Can you post your working qole.xkb as I see I'm thinking of similar keys, so I don't have to reinvent the wheel?

qole 2009-11-26 00:17

Re: xmodmap not working on n900
 
1 Attachment(s)
Sure, here it is. Sorry, I had to gzip it to attach it here.


All times are GMT. The time now is 19:14.

vBulletin® Version 3.8.8