Tags and attributes supported by the .onboard layout xml file. Francesco Fumanti francesco.fumanti@gmx.net 2016

This work is licensed under the GNU General Public License version 3 or any later version.

Supported tags and attributes

The following specification is outdated and incomplete. It is nevertheless available here, as it might be helpful when working with layouts.

Layout specification

The following section assumes a basic knowledge about markup languages by the reader. Moreover, I am only going to talk about the main points of the layout specification; you are encouraged to open the layouts shipping with Onboard in order to learn about more details.

A layout consists of one xml file with the .onboard extension and one svg file per pane defined in the .onboard file.

The .onboard file specifies what key are on each pane, their properties such as label and action; it does not specify size and the location of each key. These are defined in the svg file corresponding to the pane. The connection between the keys in the .onboard file and in the svg files is made by the ids of the keys: the key in the svg file that has the same id of a key in the .onboard file determines the size and position of the key on the pane.

You can use the application named Inkscape to create or modify the svg files corresponding to the panes. The keys can be rectangles or paths (straight lines or bezier curves) though Onboard only detects clicks quite approximately around curves. Do not forget to set the id of the keys in Inkscape by right clicking on the object and selecting object properties.

Each <pane> tag in the .onboard file has:

id = "name": the id of the pane

filename = "name": the name of the corresponding svg file

Each <key> tag in the .onboard file has:

id = "name": the id of the key

sticky = "true/false": whether the key is a latching and locking key; please see

label = "name": the default label on the key

Each <key> tag in the .onboard file can also have:

cap_label = "name": the label for when caps lock or shift is pressed

shift_label = "name": the label for when only shift is pressed

altgr_label = "name": the label for when alt gr is pressed

altgrNshift_label = "name": the label for when alt gr and shift is pressed

font_offset_x = "number between 0 and 1": the x offset of the label in the key

font_offset_y = "number between 0 and 1": the y offset of the label in the key

Each <key> tag in the .onboard file must have exactly one of:

char = "character": the character written when key pressed

keysym = "number": the keysym or the physical key being emulated in decimal or hex prefixed by 0x

modifier = "name": the name of the modifier which key emulates. It is recommended to have the sticky attribute set to true for modifiers. List of modifier names given below.

keypress = "name": name of emulated keys. List of press names given below.

macro = "number": the macro aka snippet number starting from 0 that the key corresponds with

script = "name": he name of the script which is run when key is pressed

List of modifier names that can be paired with the modifier attribute of key:

shift

caps

control

mod1 aka alt

mod2

mod3 aka num lock

mod4

mod5 aka alt gr

List of keypress names that can be paired with the keypress attribute of key:

space

insert

home

page_up

page_down

end

delete

return

backspace

List of group names that can be paired with the group attribute of key:

alphanumeric

bottomrow

backspace

misc

shifts

keypadmisc

keypadnumber

keypadoperators

directions

editing

snippets

mousebutton

scripts

fkeys