Keyboard Layouts - Universal-Team/Universal-Edit GitHub Wiki
This page is a WIP, more info to come later
Info section
"info": {
"name": "Example Layout",
"x": 0,
"y": 132,
"fullscreen": true
}
All keyboards must contain an info block with these values.
"name"
: The name of the layout to be shown in app"x"
: The X offset of all keys"y"
: The Y offset of all keys (these are so that the actual positions can look cleaner by starting at 0 and it can be more easily moved if needed)"fullscreen"
: Whether the sidebar should be hidden
Layout section
Modes
"!main": {
"keys": {
"`": [0, 0, 20, 20],
"1": [22, 0, 20, 20],
"2": [44, 0, 20, 20],
"3": [66, 0, 20, 20],
...
}
},
"shift": {
"return": true,
"keys": {
"~": [0, 0, 20, 20],
"!": [22, 0, 20, 20],
"@": [44, 0, 20, 20],
"#": [66, 0, 20, 20],
...
}
}
All keyboards must have at least the !main
mode, any amount of additional modes can be created for Shift, Caps Lock, Deadkeys, etc. Modes starting with !
are reserved, currently !main
is the initial mode and !return
can be used to return to the previous mode.
Modes that have "return"
enabled will return to the previous mode that doesn't have "return"
enabled on any key press that doesn't have an "action"
, "mode"
, or "value"
(which exact things trigger it subject to change, action and mode are the main ones that won't so that you can chain return modes).
Keys
"Tab": [0, 22, 31, 20, {"value": "\t"}],
"a": [40, 44, 20, 20],
"Shift": [0, 66, 49, 20, {"mode": "shift", "key": "Y"}],
"Shift (R)": [271, 66, 49, 20, {"mode": "shift", "label": "Shift"}],
"←": [234, 88, 20, 20, {"action": "left", "key": "LEFT"}],
Keys must have an array with their X, Y, Width, and Hight, then may optionally have an object with any of the following:
"mode"
: Changes to another mode"action"
: Performs an action"key"
: Links the key to one or more 3DS button (can be string or array of strings)"label"
: Overrides the label (since JSON keys must be unique)"value"
: Value to be typed instead of the label"active"
: Colors the key differently to indicate an active mode
Actions
"backspace"
: Deletes to the left"delete"
: Deletes to the right"up"
: Moves the cursor up"down"
: Moves the cursor down"left"
: Moves the cursor left"right"
: Moves the cursor right"dakuten"
: Changes the previous Kana to have a Dakuten, if possible"handakuten"
: Changes the previous Kana to have a Han-Dakuten, if possible"newline"
: Creates a newline (NOTE: This maybe be changed to value\n
)"exit"
: Closes the keyboard