Skip to content

Commit 69bf101

Browse files
committed
added SipleKeyboard
1 parent 5f556d2 commit 69bf101

File tree

10 files changed

+119
-7
lines changed

10 files changed

+119
-7
lines changed

README.md

416 Bytes

Клавиши по умолчанию

Imageimage

  • Левый джостик - управление мышью
  • Правый джостик - прокручивание (вверх/вниз)
  • A - Левая кнопка мыши
  • B - Правая кнопка мыши
  • X - Esc
  • Y - Backspace (Стереть)
  • Left Stick - Средняя кнопка мыши
  • Right Stick - Enter
  • RB - CTRL+V
  • LB - открыть Simple Keyboard
  • D-pad - стрелки
  • Back + Start - Включить/выключить управления ПК

Трей

image

34.1 MB
Binary file not shown.

SimpleKeyboard/langs.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Endlish:
2+
- "A"
3+
- "B"
4+
- "C"
5+
- "D"
6+
- "E"
7+
- "F"
8+
- "G"
9+
- "H"
10+
- "I"
11+
- "J"
12+
- "K"
13+
- "L"
14+
- "M"
15+
- "N"
16+
- "O"
17+
- "P"
18+
- "Q"
19+
- "R"
20+
- "S"
21+
- "T"
22+
- "U"
23+
- "V"
24+
- "W"
25+
- "X"
26+
- "Y"
27+
- "Z"
28+
29+
Russian:
30+
- "А"
31+
- "Б"
32+
- "В"
33+
- "Г"
34+
- "Д"
35+
- "Е"
36+
- "Ё"
37+
- "Ж"
38+
- "З"
39+
- "И"
40+
- "Й"
41+
- "К"
42+
- "Л"
43+
- "М"
44+
- "Н"
45+
- "О"
46+
- "П"
47+
- "Р"
48+
- "С"
49+
- "Т"
50+
- "У"
51+
- "Ф"
52+
- "Х"
53+
- "Ц"
54+
- "Ч"
55+
- "Ш"
56+
- "Щ"
57+
- "Ъ"
58+
- "Ы"
59+
- "Ь"
60+
- "Э"
61+
- "Ю"
62+
- "Я"

SimpleKeyboard/langs_settings.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Endlish:
2+
font: "MS Shell Diq 2"
3+
symbol buttons point size: 34
4+
lineEdit button point size: 16
5+
space button point size: 23
6+
up buttons point size: 18
7+
down buttons point size: 18
8+
copy button text: "Copy"
9+
paste button text: "Paste"
10+
clear button text: "Clear"
11+
space button text: "Space"
12+
backspace button text: "Backspace"
13+
change language button text: "Change language"
14+
shift button text: "Shift"
15+
16+
Russian:
17+
font: "MS Shell Diq 2"
18+
symbol buttons point size: 34
19+
lineEdit button point size: 16
20+
space button point size: 23
21+
up buttons point size: 18
22+
down buttons point size: 18
23+
copy button text: "Копировать"
24+
paste button text: "Вставить"
25+
clear button text: "Отчистить"
26+
space button text: "Пробел"
27+
backspace button text: "Стереть"
28+
change language button text: "Сменить язык"
29+
shift button text: "Shift"

SimpleKeyboard/logo.png

9.81 KB
Loading

SimpleKeyboard/style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.QLineEdit {
2+
color: black;
3+
}
4+
5+
.QPushButton {
6+
color: black;
7+
}
8+
9+
.QWidget {
10+
background-color: white;
11+
}

main.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ def btn_function(self, key, state):
270270
hotkeys = config.read(key, 'hotkey')
271271

272272
mouse_ = ['RMB', 'LMB', 'MMB']
273-
notkeyboard = mouse_
273+
func = ['SK']
274+
275+
notkeyboard = mouse_ + func
274276

275277
for hotkey in list(map(str, hotkeys.split('+'))):
276278
hotkey = Settings_UI.keyboard_keys[hotkey]
@@ -286,6 +288,13 @@ def btn_function(self, key, state):
286288
time.sleep(0.01)
287289
else:
288290
mouse.release(mouse_keys[hotkey])
291+
292+
elif hotkey in func:
293+
if hotkey == 'SK':
294+
if state == 1:
295+
test_process = threading.Thread(target=os.system, args=("cd SimpleKeyboard & TS2_SimpleKeyboard.exe", ), daemon=True)
296+
test_process.start()
297+
del test_process
289298

290299
except Exception:
291300
logger.logging.error(traceback.format_exc().replace('"', '\''))

modules/Configure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, config_path):
2525
'use_command': '0',
2626
'use_hotkey': '1',
2727
'command': '',
28-
'hotkey': 'MIDDLE MOUSE BUTTON'
28+
'hotkey': 'ENTER'
2929
}
3030
self.config['D_Pad_up'] = {
3131
'use_command': '0',
@@ -89,9 +89,9 @@ def __init__(self, config_path):
8989
}
9090
self.config['RB'] = {
9191
'use_command': '0',
92-
'use_hotkey': '0',
92+
'use_hotkey': '1',
9393
'command': '',
94-
'hotkey': 'No Key'
94+
'hotkey': 'CTRL+V'
9595
}
9696
self.config['RT'] = {
9797
'use_command': '0',
@@ -101,9 +101,9 @@ def __init__(self, config_path):
101101
}
102102
self.config['LB'] = {
103103
'use_command': '0',
104-
'use_hotkey': '0',
104+
'use_hotkey': '1',
105105
'command': '',
106-
'hotkey': 'No Key'
106+
'hotkey': 'SIMPLE KEYBOARD'
107107
}
108108
self.config['LT'] = {
109109
'use_command': '0',

ui templates/Settings.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,4 +377,4 @@
377377
</widget>
378378
<resources/>
379379
<connections/>
380-
</ui>
380+
</ui>

ui/Settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Ui_SettingsWindow(QMainWindow):
2020
'LEFT MOUSE BUTTON': 'LMB',
2121
'MIDDLE MOUSE BUTTON': 'MMB',
2222
'RIGHT MOUSE BUTTON': 'RMB',
23+
'SIMPLE KEYBOARD': 'SK',
2324
'ALT': 'alt',
2425
'RIGHT ALT': 'right alt',
2526
'BACKSPACE': 'backspace',

0 commit comments

Comments
 (0)