[Sugar-devel] Fwd: French keyboard map for XO-4 non-membrane keyboard

James Cameron quozl at laptop.org
Sun Dec 21 20:21:29 EST 2014


On Sat, Dec 20, 2014 at 09:51:43PM +0100, Lionel Laské wrote:
> 2014-12-18 21:18 GMT+01:00 James Cameron <[1]quozl at laptop.org>:
> > You might be able to hack something up with xmodmap, if you only
> > need to swap a few keys around. There are many examples of xmodmap
> > on the internet. xmodmap may be suitable for a temporary solution
> > on a small group of laptops. google "french english xmodmap".
> 
> Thanks for your advice.
> I've done some hack with xmodmap, you're right, it's easy to create
> a .xmodmap file to map French keyboard.
> Something like:
> 
> keycode a = q Q
> keycode z = w W
> keycode q = a A
> keycode w = z Z

That's odd, this didn't work for me, but numbers did:

keycode 38 = q Q
keycode 52 = w W
keycode 24 = a A
keycode 25 = z Z

> When I launch "xmodmap french.xmodmap" from the terminal, it map
> correctly the new keyboard.
> I'm trying now to force this new mapping at startup.
> Following [1], I've tried to update the /etc/X11/Xmodmap and add the
> call to xmodmap in /etc/X11/xinit/xinitrc but without success.
> 
> Any idea where I can add the call to be sure it will be call at
> Sugar startup ?

Too many places.  Best might be ~/.kbd script file.

	echo 'xmodmap french.xmodmap' > ~/.kbd

For making builds, a better place may be:

	echo 'xmodmap /path/to/french.xmodmap' > /etc/X11/xinit/xinitrc.d/french

Also available are:

	/etc/profile.d/lang.sh called by olpc-session
	~/.sugar/debug called by olpc-session
	~/.i18n called by /etc/profile.d/lang.sh 
	~/.xsession called by olpc-session

All are executed using . shell command, so no chmod is necessary.

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list