Fladder/lib/widgets/keyboard/keyboard_localization.dart
PartyDonut 75c2f958b4
feat: Implement custom keyboard for Android TV (#523)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
2025-10-09 09:59:30 +02:00

92 lines
3.1 KiB
Dart

class KeyboardLayouts {
static const Map<String, Map<KeyboardLayer, List<List<String>>>> layouts = {
'en': {
KeyboardLayer.alpha: [
['A', 'B', 'C', 'D', 'E', 'F', 'G', ''],
['H', 'I', 'J', 'K', 'L', 'M', 'N', '123'],
['O', 'P', 'Q', 'R', 'S', 'T', 'U'],
['V', 'W', 'X', 'Y', 'Z'],
],
KeyboardLayer.numericExtra: [
['1', '2', '3', '&', '#', '(', ')', ''],
['4', '5', '6', '@', '!', '?', ':', 'ABC'],
['7', '8', '9', '.', '-', '_', '"', ':'],
['0', '/', '\$', '%', '+', '[', ']'],
],
},
'es': {
KeyboardLayer.alpha: [
['A', 'B', 'C', 'D', 'E', 'F', 'G', ''],
['H', 'I', 'J', 'K', 'L', 'M', 'N', '123'],
['O', 'P', 'Q', 'R', 'S', 'T', 'U'],
['V', 'W', 'X', 'Y', 'Z', 'Ñ'],
],
KeyboardLayer.numericExtra: [
['1', '2', '3', '&', '#', '(', ')', ''],
['4', '5', '6', '@', '!', '?', ';', 'ABC'],
['7', '8', '9', '.', '-', '_', '"'],
['0', '/', '\$', '%', '+', '[', ']'],
],
},
'de': {
KeyboardLayer.alpha: [
['A', 'B', 'C', 'D', 'E', 'F', 'G', ''],
['H', 'I', 'J', 'K', 'L', 'M', 'N', '123'],
['O', 'P', 'Q', 'R', 'S', 'T', 'U'],
['V', 'W', 'X', 'Y', 'Z', 'Ä', 'Ö', 'Ü'],
],
KeyboardLayer.numericExtra: [
['1', '2', '3', '&', '#', '(', ')', ''],
['4', '5', '6', '@', '!', '?', ';', 'ABC'],
['7', '8', '9', '.', '-', '_', '"'],
['0', '/', '\$', '%', '+', '[', ']'],
],
},
'fr': {
KeyboardLayer.alpha: [
['A', 'B', 'C', 'D', 'E', 'F', 'G', ''],
['H', 'I', 'J', 'K', 'L', 'M', 'N', '123'],
['O', 'P', 'Q', 'R', 'S', 'T', 'U'],
['V', 'W', 'X', 'Y', 'Z', 'É', 'È', 'À'],
],
KeyboardLayer.numericExtra: [
['1', '2', '3', '&', '#', '(', ')', ''],
['4', '5', '6', '@', '!', '?', ';', 'ABC'],
['7', '8', '9', '.', '-', '_', '"'],
['0', '/', '\$', '%', '+', '[', ']'],
],
},
'ja': {
KeyboardLayer.alpha: [
['', '', '', '', '', '', '', ''],
['', '', '', '', '', '', '', '123'],
['', '', '', '', '', '', ''],
['', '', '', '', '', '', '', '', '', ''],
],
KeyboardLayer.numericExtra: [
['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', ''],
['!', '@', '#', '\$', '%', '^', '&', '*', '(', ')', 'ABC'],
],
},
'zh': {
KeyboardLayer.alpha: [
['', '', '', '', '饿', '', '', ''],
['', '', '', '', '', '', '', '123'],
['', '', '', '', '', '', ''],
['', '西', '', '', '', ''],
],
KeyboardLayer.numericExtra: [
['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', ''],
['!', '@', '#', '\$', '%', '^', '&', '*', '(', ')', 'ABC'],
],
},
};
}
enum KeyboardLayer {
alpha,
numericExtra,
numeric,
email,
domain,
}