View Single Post
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#257
Originally Posted by n950 View Post
Hi,
I have ubuntu 18 installed on my XA2 plus.
about onboard
i would like to change layout because i have full keyboard activated.
with onboard settings when i change it it doesn't work.
how to change the layout with terminal? command line
Editing onboard layouts is actually quite complicated.

If you go to /usr/share/onboard/layouts you'll find two files for each layout. One is an svg file that defines the sizes, positions and shapes of the keys, the other one is an xml file that defines what the keys do.

An svg file will contain a bunch of key-shaped forms that have (mostly) four-letter names which I will call "key IDs".
I managed to edit these svg files with inkscape. However while I was able to create new keys and I think I also named them correctly, I was not able to link these keys to key definitions in the xml file. But that might be just due to me not being familiar with inkscape.

One xml file may be vaild for multiple svg files.
There are <panel> tags in the xml file which define which svg file to use.
Inside these <panel> tags there are <key> tags that define individual keys.
The keys of an xml and an svg file are connected via onboard's key IDs.
Which key a key ID actually produces is defined in a <keyboard> tag that links onboard's key IDs with the system's keycodes. This key definition is by default included from another file called key_defs.xml
onboard keys are by default labeled with the character that is associated with the keycode, which is linked to the key ID. However, this label can be replaced with another label by supplying a label= value in the <key> tag and/or with a graphic by supplying n image= value.

I suggest you copy an example svg/xml pair that includes a superset(!) of the keys you need to your home directory (default would be ~/.local/share/onboard/layouts ) and edit this one.
Then you can easily load this custom layout from onboard's settings dialogue.

Last edited by sulu; 2019-02-06 at 06:23. Reason: fixed typo: s/svg/xml/ (underscored)
 

The Following 3 Users Say Thank You to sulu For This Useful Post: