Fix German Keyboard and Add French Keyboard (#886)

This commit is contained in:
Cyril Guislain 2023-02-06 04:47:11 +01:00 committed by GitHub
parent 49add980b3
commit c33b5d6311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ from gi.repository import Gtk, GLib
class Keyboard(Gtk.Box):
langs = ["de", "en", "es"]
langs = ["de", "en", "fr", "es"]
def __init__(self, screen, close_cb, entry=None):
super().__init__(orientation=Gtk.Orientation.VERTICAL)
@ -26,17 +26,45 @@ class Keyboard(Gtk.Box):
[
["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", ""],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä"],
["ABC", "y", "x", "c", "v", "b", "n", "m", ",", ".", "?123"],
["ABC", "123", "#+=", "y", "x", "c", "v", "b", "n", "m"],
],
[
["Q", "W", "E", "R", "T", "Z", "U", "I", "O", "P", "Ü", ""],
["A", "S", "D", "F", "G", "H", "J", "K", "L", "Ö", "Ä"],
["?123", "Y", "X", "C", "V", "B", "N", "M", ",", ".", "abc"],
["abc", "123", "#+=", "Y", "X", "C", "V", "B", "N", "M"],
],
[
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ß", ""],
["=", "-", "+", "*", "/", "\\", ":", ";", "'", "\"", ""],
["abc", "(", ")", "#", "$", "!", "?", "@", "_", ",", "ABC"],
["-", "/", ":", ";", "(", ")", "$", "&", "@", "\"", ""],
["ABC", "abc", "#+=", ".", ",", "?", "!", "'"],
],
[
["[", "]", "{", "}", "#", "%", "^", "*", "+", "=", ""],
["_", "\\", "|", "~", "<", ">", "", "£", "¥", ""],
["ABC", "abc", "123", ".", ",", "?", "!", "'"],
]
]
if language == "fr":
self.keys = [
[
["a", "z", "e", "r", "t", "y", "u", "i", "o", "p", ""],
["q", "s", "d", "f", "g", "h", "j", "k", "l", "m"],
["ABC", "123", "#+=", "w", "x", "c", "v", "b", "n"],
],
[
["A", "Z", "E", "R", "T", "Y", "U", "I", "O", "P", ""],
["Q", "S", "D", "F", "G", "H", "J", "K", "L", "M"],
["abc", "123", "#+=", "W", "X", "C", "V", "B", "N"],
],
[
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ""],
["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""],
["ABC", "abc", "#+=", ".", ",", "?", "!", "'"],
],
[
["[", "]", "{", "}", "#", "%", "^", "*", "+", "=", ""],
["_", "\\", "|", "~", "<", ">", "", "£", "¥", ""],
["ABC", "abc", "123", ".", ",", "?", "!", "'"],
]
]
else:
@ -44,23 +72,22 @@ class Keyboard(Gtk.Box):
[
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", ""],
["a", "s", "d", "f", "g", "h", "j", "k", "l"],
["ABC", "z", "x", "c", "v", "b", "n", "m", "123"],
["ABC", "123", "#+=", "z", "x", "c", "v", "b", "n", "m"],
],
[
["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", ""],
["A", "S", "D", "F", "G", "H", "J", "K", "L"],
["123", "Z", "X", "C", "V", "B", "N", "M", "abc"],
["abc", "123", "#+=", "Z", "X", "C", "V", "B", "N", "M"],
],
[
["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ""],
["-", "/", ":", ";", "(", ")", "$", "&", "@", "\""],
["abc", "#+=", ".", ",", "?", "!", "'", "ABC"],
["ABC", "abc", "#+=", ".", ",", "?", "!", "'"],
],
[
["[", "]", "{", "}", "#", "%", "^", "*", "+", "=", ""],
["_", "\\", "|", "~", "<", ">", "", "£", "¥", ""],
["abc", "123", ".", ",", "?", "!", "'", "ABC"],
["ABC", "abc", "123", ".", ",", "?", "!", "'"],
]
]