Oh, I don't care about the colours. That's just going to be specified as a root field called 'Keyset Name'.
It's the different sized keys that worry me. Ctrl.125, Ctrl.100 and Ctrl.150 are different keys and need to be treated differently.
And then there's the secondary problem of Caps.175.Control - the caps lock placement key with Control legend.
But if I skip the secondary problem for now, I might be able to work it out with just having size as an optional field, and using the normal ANSI layout as the default. Oh, and ISO will have to be a "size" for the enter key, which is interesting.
So it would look something like this:
{
"Keyboard": {
"Name": "Default 60%",
"Number of keys": 61,
"Layout": "ANSI",
"Rows": 5,
"Keys": [
["ESC", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "BSPC"],
["TAB", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]", "\\"],
["CAPS", "A", "S", "D", {"Key":"F", "Homing": true}, "G", "H", {"Key":"J","Homing": true},"K", "L", ";", "'", "ENTR" ],
["LSFT", "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "RSFT"],
["LCTR", "LGUI", "LALT", "SPC", "RALT", "RGUI", "MENU", "RCTR"]
]
}
}
Although it might be better like this:
"Keys": {
"R1": ["ESC", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "BSPC"],
"R2": ["TAB", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]", "\\"],
"R3": ["CAPS", "A", "S", "D", {"Key":"F", "Homing": true}, "G", "H", {"Key":"J","Homing": true},"K", "L", ";", "'", "ENTR" ],
"R4": ["LSFT", "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "RSFT"],
"R5": ["LCTR", "LGUI", "LALT", "SPC", "RALT", "RGUI", "MENU", "RCTR"]
}
And of course, the WKL layout would look like this:
{
"Keyboard": {
"Name": "Winkeyless",
"Number of keys": 58,
"Layout": "ANSI",
"Rows": 5,
"Keys": {
"R1": ["ESC", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "BSPC"],
"R2": ["TAB", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]", "\\"],
"R3": ["CAPS", "A", "S", "D", {"Key": "F","Homing": true}, "G", "H", {"Key": "J","Homing": true}, "K", "L", ";", "'", "ENTR"],
"R4": ["LSFT", "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "RSFT"],
"R5": [{"Key:": "LCTR","Width": 150}, {"Key": "LALT","Width": 150}, {"Key": "SPC","Width": 700}, {"Key": "RALT","Width": 150}, {"Key": "RCTR","Width": 150}]
}
}
}
And finally, my personal Pok3r layout in a flattened JSON layout:
{
"Keyboard.Name": "Default 60%",
"Keyboard.Number of keys": 61,
"Keyboard.Layout": "ANSI",
"Keyboard.Rows": 5,
"Keyboard.Keys.R1.0": "ESC",
"Keyboard.Keys.R1.1": "1",
"Keyboard.Keys.R1.2": "2",
"Keyboard.Keys.R1.3": "3",
"Keyboard.Keys.R1.4": "4",
"Keyboard.Keys.R1.5": "5",
"Keyboard.Keys.R1.6": "6",
"Keyboard.Keys.R1.7": "7",
"Keyboard.Keys.R1.8": "8",
"Keyboard.Keys.R1.9": "9",
"Keyboard.Keys.R1.10": "0",
"Keyboard.Keys.R1.11": "-",
"Keyboard.Keys.R1.12": "=",
"Keyboard.Keys.R1.13": "BSPC",
"Keyboard.Keys.R2.0": "TAB",
"Keyboard.Keys.R2.1": "Q",
"Keyboard.Keys.R2.2": "W",
"Keyboard.Keys.R2.3": "E",
"Keyboard.Keys.R2.4": "R",
"Keyboard.Keys.R2.5": "T",
"Keyboard.Keys.R2.6": "Y",
"Keyboard.Keys.R2.7": "U",
"Keyboard.Keys.R2.8": "I",
"Keyboard.Keys.R2.9": "O",
"Keyboard.Keys.R2.10": "P",
"Keyboard.Keys.R2.11": "[",
"Keyboard.Keys.R2.12": "]",
"Keyboard.Keys.R2.13": "\\",
"Keyboard.Keys.R3.0.Key": "LCTR",
"Keyboard.Keys.R3.0.Width": 175,
"Keyboard.Keys.R3.1": "A",
"Keyboard.Keys.R3.2": "S",
"Keyboard.Keys.R3.3": "D",
"Keyboard.Keys.R3.4.Key": "F",
"Keyboard.Keys.R3.4.Homing": true,
"Keyboard.Keys.R3.5": "G",
"Keyboard.Keys.R3.6": "H",
"Keyboard.Keys.R3.7.Key": "J",
"Keyboard.Keys.R3.7.Homing": true,
"Keyboard.Keys.R3.8": "K",
"Keyboard.Keys.R3.9": "L",
"Keyboard.Keys.R3.10": ";",
"Keyboard.Keys.R3.11": "'",
"Keyboard.Keys.R3.12": "ENTR",
"Keyboard.Keys.R4.0": "LSFT",
"Keyboard.Keys.R4.1": "Z",
"Keyboard.Keys.R4.2": "X",
"Keyboard.Keys.R4.3": "C",
"Keyboard.Keys.R4.4": "V",
"Keyboard.Keys.R4.5": "B",
"Keyboard.Keys.R4.6": "N",
"Keyboard.Keys.R4.7": "M",
"Keyboard.Keys.R4.8": ",",
"Keyboard.Keys.R4.9": ".",
"Keyboard.Keys.R4.10": "/",
"Keyboard.Keys.R4.11": "RSFT",
"Keyboard.Keys.R5.0.Key": "FN",
"Keyboard.Keys.R5.0.Width": 125,
"Keyboard.Keys.R5.1": "LALT",
"Keyboard.Keys.R5.2": "LGUI",
"Keyboard.Keys.R5.3": "SPC",
"Keyboard.Keys.R5.4": "RGUI",
"Keyboard.Keys.R5.5": "RALT",
"Keyboard.Keys.R5.6.Key": "FN",
"Keyboard.Keys.R5.6.Width": 125,
"Keyboard.Keys.R5.7": "RCTR"
}
Anywho... Thoughts?
Edit: Ironically I wrote all this on my macbook pro, and now my hands hurt...