ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

Change keyboard layout for matchbox

Wed Sep 30, 2015 5:08 pm

Hello,
does anyone know how to change the keyboard on matchbox to another (german) layout?
Thank you

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Change keyboard layout for matchbox

Wed Sep 30, 2015 7:43 pm

Go to "/usr/share/matchbox-keyboard/" and you'll see the included keyboard layouts. I'm not at a RPi at the moment and I don't remember if there was a German layout or not. But you can customize a keyboard to anything you like, it uses an .xml file.

If there is a layout you want then copy it to your home directory, and it will use that as your default, so you can edit it without changing any of the setups included with the install. If you mess it up you can just copy it again and start over.

For example if you wanted to use/modify the default layout named "keyboard.xml".
Create a new directory in your home directory named ".matchbox"

Code: Select all

mkdir ~/.matchbox

sudo cp /usr/share/matchbox-keyboard/keyboard.xml ~/.matchbox/keyboard.xml

sudo chown pi:pi ~/.matchbox/keyboard.xml
Now you can edit the .xml file with the editor of your choice and you won't need sudo.

I removed some keys, moved some keys to another location, and changed spacing. If you look over the .xml file it's not hard to figure out. Plus I changed all the key labels to uppercase, as they are easier for me to read, and keyboards generally show the alphabet keys in uppercase anyway.

OOPS: I forgot that I edited the keys to uppercase and that didn't work as I had to use 'shift' to get lower case so I had to change it back. That's what happens when you think you know what you did, but what you did is not what you think because you changed your mind some time after that.

ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

Re: Change keyboard layout for matchbox

Fri Oct 02, 2015 7:22 pm

Hi JimmyN,
thanks for your reply.
I created a new folder under: /home/pi/.matchbox/, where I loaded a Keyboard.xml with german layout. matchbox won't accept the keyboard layout, what do I have to change?

Did you as well notice, after restarting you open matchbox, and then open other programes, you can't change the size of the window. The window is tha same size as the matchbox window. :evil:

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Change keyboard layout for matchbox

Fri Oct 02, 2015 8:07 pm

It might have to be named "keyboard.xml", that is the default it loads from the list of keyboard layouts. You can probably specify a layout when you start matchbox, but I actually used the "keyboard.xml" file and edited that, so I haven't played with different names.

Mine doesn't do that, it doesn't resize the open window. If I open Leafpad or LXTerminal they come up normal sized. When I then start matchbox-keyboard it covers up the bottom of the open window. If I get about half way down I move the keyboard to the top so I can see the bottom of the window. When I close matchbox the full sized window is still there.

You can also add a icon to your launchbar. Mine is right next to the menu button and it works as a toggle. When I touch it matchbox opens, when I touch it again matchbox closes, it's pretty handy.

ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

Re: Change keyboard layout for matchbox

Fri Oct 02, 2015 9:05 pm

Now,
matchbox won't open.
I found a keymap. I download it with:
wget http://wiki.openmoko.org/images/7/72/keyboard.xml into /home/pi/.matchbox/
but it won't work, matchbox is not opening. Could you test this out?
cheers

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Change keyboard layout for matchbox

Sat Oct 03, 2015 12:14 am

I get a "404 not found error" for that link

ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

Re: Change keyboard layout for matchbox

Sat Oct 03, 2015 7:42 pm

Sorry,
used the wrong link.

http://wiki.openmoko.org/images/7/72/Keyboard.xml

This works... (no 404) but no feedback from matchbox :?

ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

Re: Change keyboard layout for matchbox

Mon Oct 05, 2015 10:57 am

Does it work?

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Change keyboard layout for matchbox

Mon Oct 05, 2015 5:23 pm

Sorry, I was out of town for a bit and only had my tablet with me. I'll check into the file and see if it works for me.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Change keyboard layout for matchbox

Mon Oct 05, 2015 7:13 pm

That file doesn't work for me, there is something wrong with it, matchbox wouldn't even open.

Here is the keyboard file I'm using. Rename the one you have to preserve it, and put this in ~/.matchbox and see if it works. Leave the name the same, it should be "keyboard.xml". "Keyboard.xml" is not going to work and it will go back to the defaults and use that keyboard.xml file.

https://www.dropbox.com/s/kt6v0da0qnvv8 ... d.xml?dl=1

Return to “Official Foundation Display”