-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
38 lines (35 loc) · 1.63 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
dict_codes_en = {
"1": 2, "2": 3, "3": 4, "4": 5, "5": 6,
"6": 7, "7": 8, "8": 9, "9": 10, "0": 11,
"-": 12, "=": 13, "'\\'": 43, " ": 57,
'\x08': 58, 'Tab': 59, 'Caps_Lock': 60,
'Return': 61, 'Shift_L': 62, 'Shift_R': 63,
'fn': 64, 'Control_L': 65, 'Alt_L': 66,
'Win_L': 67, 'Win_R': 68, 'Alt_R': 69,
'Left': 70, 'Up': 71, 'Down': 72, 'Right': 73,
"!": 2, "'": 3, "#": 4, ";": 5, "%": 6,
":": 7, "?": 8, "*": 9, "(": 10, ")": 11,
"_": 12, "+": 13, ",": 53, '\n': 61
}
# Русская раскладка клавиатуры
dict_codes_ru = {
"й": 16, "ц": 17, "у": 18, "к": 19, "е": 20,
"н": 21, "г": 22, "ш": 23, "щ": 24, "з": 25,
"х": 26, "ъ": 27, "ф": 30, "ы": 31, "в": 32,
"а": 33, "п": 34, "р": 35, "о": 36, "л": 37,
"д": 38, "ж": 39, "э": 40, "ё": 41, "я": 44,
"ч": 45, "с": 46, "м": 47, "и": 48, "т": 49,
"ь": 50, "б": 51, "ю": 52, ".": 53,
}
# Объединение двух словарей, если нужно
dict_codes = {**dict_codes_en, **dict_codes_ru}
dict_shift = {"!": 2, "'": 3, "№": 4, ";": 5, "%": 6,
":": 7, "?": 8, "*": 9, "(": 10, ")": 11,
"_": 12, "+": 13, "Й": 16,
"Ц": 17, "У": 18, "К": 19, "Е": 20, "Н": 21,
"Г": 22, "Ш": 23, "Щ": 24, "З": 25, "Х": 26,
"Ъ": 27, "Ф": 30, "Ы": 31, "В": 32, "А": 33,
"П": 34, "Р": 35, "О": 36, "Л": 37, "Д": 38,
"Ж": 39, "Э": 40, "Ё": 41, "/": 43, "Я": 44,
"Ч": 45, "С": 46, "М": 47, "И": 48, "Т": 49,
"Ь": 50, "Б": 51, "Ю": 52, ",": 53}