2541
правка
Изменения
Перейти к навигации
Перейти к поиску
→Описание создания клавиатуры (элементы хххKeyboard)
= Описание создания клавиатуры (элементы ''ххх''Keyboard) =
{| class="wikitable"
|-
! Имя тега !! Тип данных !! Описание !! Используется в алгоритмах
|-
| rows || int || Количество рядов клавиатуры ||
|-
| button-in-row|| int || Количество кнопок в каждом ряду ||
|-
| row-'''''x''''' || array || Описание ряда '''''x''''' клавиатуры ||
|-
| button-'''''x''''' || array || Описание кнопки '''''x''''' ||
|-
| type || int || Тип кнопки ||
|-
| name || string || Название (надпись) кнопки ||
|-
| picture || string || Картинка кнопки ||
|-
| col-in-button || int || Количество занимаемых кнопкой столбцов ||
|}
Пример описания цифровой клавиатуры:
<source lang="json">
"spacing" : 0,
"keyboard-map" : {
"rows" : 4,
"button-in-row" : 3,
"row-1" : {
"button-1" : { "type" : 1 },
"button-2" : { "type" : 2 },
"button-3" : { "type" : 3 },
},
"row-2" : {
"button-1" : { "type" : 4 },
"button-2" : { "type" : 5 },
"button-3" : { "type" : 6 },
},
"row-3" : {
"button-1" : { "type" : 7 },
"button-2" : { "type" : 8 },
"button-3" : { "type" : 9 },
},
"row-4" : {
"button-1" : { "type" : 10, "name" : "", "picture" : "./A21/r1s.a21.backspaceb.png", "col-in-button" : "1" },
"button-2" : { "type" : 0 },
"button-3" : { "type" : 11, "name" : "Ввод", "picture" : " " },
},
}
</source>
Пример описания клавиатуры с алфавитом:
<source lang="json">
"spacing" : 0,
"keyboard-map" : {
"rows" : 7,
"button-in-row" : 5,
"row-1" : {
"button-1" : { "type" : 19, "name" : "а", "picture" : " " },
"button-2" : { "type" : 19, "name" : "б", "picture" : " " },
"button-3" : { "type" : 19, "name" : "в", "picture" : " " },
"button-4" : { "type" : 19, "name" : "г", "picture" : " " },
"button-5" : { "type" : 19, "name" : "д", "picture" : " " },
},
"row-2" : {
"button-1" : { "type" : 19, "name" : "е", "picture" : " " },
"button-2" : { "type" : 19, "name" : "ж", "picture" : " " },
"button-3" : { "type" : 19, "name" : "з", "picture" : " " },
"button-4" : { "type" : 19, "name" : "и", "picture" : " " },
"button-5" : { "type" : 19, "name" : "й", "picture" : " " },
},
"row-3" : {
"button-1" : { "type" : 19, "name" : "к", "picture" : " " },
"button-2" : { "type" : 19, "name" : "л", "picture" : " " },
"button-3" : { "type" : 19, "name" : "м", "picture" : " " },
"button-4" : { "type" : 19, "name" : "н", "picture" : " " },
"button-5" : { "type" : 19, "name" : "о", "picture" : " " },
},
"row-4" : {
"button-1" : { "type" : 19, "name" : "п", "picture" : " " },
"button-2" : { "type" : 19, "name" : "р", "picture" : " " },
"button-3" : { "type" : 19, "name" : "с", "picture" : " " },
"button-4" : { "type" : 19, "name" : "т", "picture" : " " },
"button-5" : { "type" : 19, "name" : "у", "picture" : " " },
},
"row-5" : {
"button-1" : { "type" : 19, "name" : "ф", "picture" : " " },
"button-2" : { "type" : 19, "name" : "х", "picture" : " " },
"button-3" : { "type" : 19, "name" : "ц", "picture" : " " },
"button-4" : { "type" : 19, "name" : "ч", "picture" : " " },
"button-5" : { "type" : 19, "name" : "ш", "picture" : " " },
},
"row-6" : {
"button-1" : { "type" : 19, "name" : "щ", "picture" : " " },
"button-2" : { "type" : 19, "name" : "ы", "picture" : " " },
"button-3" : { "type" : 19, "name" : "ъ", "picture" : " " },
"button-4" : { "type" : 19, "name" : "э", "picture" : " " },
"button-5" : { "type" : 19, "name" : "ю", "picture" : " " },
},
"row-7" : {
"button-1" : { "type" : 10, "name" : "", "picture" : "./A21/r1s.a21.backspaceb.png", "col-in-button" : "4" },
"button-2" : { "type" : 10, "name" : "я", "picture" : " " },
"button-3" : { "type" : 1 },
"button-4" : { "type" : 2 },
"button-5" : { "type" : 19, "name" : "я", "picture" : " " },
},
}
</source>
= Дополнительное описание =