keyboard: Replace Keypad object with a "digits" JSON OSK keymap

Drop some code, in favor of a numeric keypad that is driven through
the same JSON-based maps. This is also a first use of the "height"
key property in the JSON files, for the Enter key.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
This commit is contained in:
Carlos Garnacho 2024-01-26 18:04:18 +01:00
parent 3f6f2f2376
commit 32ada34e1d
3 changed files with 86 additions and 79 deletions

View file

@ -12,6 +12,7 @@
<file>ch+fr.json</file>
<file>cz.json</file>
<file>de.json</file>
<file>digits.json</file>
<file>dk.json</file>
<file>ee.json</file>
<file>epo.json</file>

View file

@ -0,0 +1,83 @@
{
"levels": [
{
"level": "",
"mode": "default",
"rows": [
[
{
"strings": [
"7"
]
},
{
"strings": [
"8"
]
},
{
"strings": [
"9"
]
},
{
"action": "delete",
"iconName": "edit-clear-symbolic"
}
],
[
{
"strings": [
"4"
]
},
{
"strings": [
"5"
]
},
{
"strings": [
"6"
]
},
{
"iconName": "keyboard-enter-symbolic",
"keyval": "0xff0d",
"height": 2
}
],
[
{
"strings": [
"1"
]
},
{
"strings": [
"2"
]
},
{
"strings": [
"3"
]
}
],
[
{
"width": 3,
"strings": [
"0"
]
},
{
"action": "hide",
"iconName": "keyboard-hide-symbolic"
}
]
]
}
],
"name": "Digits"
}