This repository has been archived on 2025-12-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
food-coop-waage/addons/onscreenkeyboard/default_layout.gd
Felix 4b1796250c Initial commit
Half-baked state. Most of the UI is mostly done, but the integration
with Grist (or any other data provider) is still missing.
2025-05-11 19:19:24 +02:00

160 lines
2.6 KiB
GDScript

extends "keyboard_layout.gd"
func _init():
data = {
"debug": false,
"layouts": [
{
"name": "standart-characters",
"rows": [
make_row(
[],
"qwertyuiop",
[
{
"output": "Backspace",
"display-icon": "PREDEFINED:DELETE",
"stretch-ratio": 1.5
}
]
),
make_row(
[],
"asdfghjkl",
[{
"output": "Return",
"display": "Enter",
"stretch-ratio": 1.5
}]
),
make_row(
[{
"type": "special-shift",
"display-icon": "PREDEFINED:SHIFT",
"stretch-ratio": 1.5
}],
"zxcvbnm",
[{
"type": "special-shift",
"display-icon": "PREDEFINED:SHIFT",
"stretch-ratio": 2
}]
),
{
"keys": [
{
"type": "switch-layout",
"layout-name": "special-characters",
"display": "&123",
"stretch-ratio": 1.5
},
{
"type": "char",
"output": ",",
"display": ","
},
{
"type": "char",
"output": "Space",
"stretch-ratio": 5
},
{
"type": "char",
"output": ".",
"display": "."
},
{
"type": "special",
"output": "LeftArrow",
"display-icon": "PREDEFINED:LEFT"
},
{
"type": "special",
"output": "RightArrow",
"display-icon": "PREDEFINED:RIGHT"
},
{
"type": "special-hide-keyboard",
"display-icon": "PREDEFINED:HIDE",
"stretch-ratio": 2
}
]
}
]
},
{
"name": "special-characters",
"rows": [
make_row(
[],
"1234567890",
[
{
"type": "special",
"output": "Backspace",
"display-icon": "PREDEFINED:DELETE",
"stretch-ratio": 1.5
}
]
),
make_row(
[],
"@#$%&-+=~()",
[{
"type": "special",
"output": "Return",
"display": "Enter",
"stretch-ratio": 2
}]
),
make_row(
[],
"*\"':;!?<>{}[]",
[]
),
make_row(
[{
"type": "switch-layout",
"layout-name": "standart-characters",
"display": "ABC",
"stretch-ratio": 1.5
}],
"",
[
{
"type": "char",
"output": "_",
"display": "_"
},
{
"type": "char",
"output": "/",
"display": "/"
},
{
"type": "char",
"output": "Space",
"stretch-ratio": 5
},
{
"type": "special",
"output": "LeftArrow",
"display-icon": "PREDEFINED:LEFT"
},
{
"type": "special",
"output": "RightArrow",
"display-icon": "PREDEFINED:RIGHT"
},
{
"type": "special-hide-keyboard",
"display-icon": "PREDEFINED:HIDE",
"stretch-ratio": 2
}
]
)
]
}
]
}