Skip to content

Commit

Permalink
added SipleKeyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoker2 committed Jan 21, 2023
1 parent 5f556d2 commit 69bf101
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 7 deletions.
Binary file modified README.md
Binary file not shown.
Binary file added SimpleKeyboard/TS2_SimpleKeyboard.exe
Binary file not shown.
62 changes: 62 additions & 0 deletions SimpleKeyboard/langs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Endlish:
- "A"
- "B"
- "C"
- "D"
- "E"
- "F"
- "G"
- "H"
- "I"
- "J"
- "K"
- "L"
- "M"
- "N"
- "O"
- "P"
- "Q"
- "R"
- "S"
- "T"
- "U"
- "V"
- "W"
- "X"
- "Y"
- "Z"

Russian:
- "А"
- "Б"
- "В"
- "Г"
- "Д"
- "Е"
- "Ё"
- "Ж"
- "З"
- "И"
- "Й"
- "К"
- "Л"
- "М"
- "Н"
- "О"
- "П"
- "Р"
- "С"
- "Т"
- "У"
- "Ф"
- "Х"
- "Ц"
- "Ч"
- "Ш"
- "Щ"
- "Ъ"
- "Ы"
- "Ь"
- "Э"
- "Ю"
- "Я"
29 changes: 29 additions & 0 deletions SimpleKeyboard/langs_settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Endlish:
font: "MS Shell Diq 2"
symbol buttons point size: 34
lineEdit button point size: 16
space button point size: 23
up buttons point size: 18
down buttons point size: 18
copy button text: "Copy"
paste button text: "Paste"
clear button text: "Clear"
space button text: "Space"
backspace button text: "Backspace"
change language button text: "Change language"
shift button text: "Shift"

Russian:
font: "MS Shell Diq 2"
symbol buttons point size: 34
lineEdit button point size: 16
space button point size: 23
up buttons point size: 18
down buttons point size: 18
copy button text: "Копировать"
paste button text: "Вставить"
clear button text: "Отчистить"
space button text: "Пробел"
backspace button text: "Стереть"
change language button text: "Сменить язык"
shift button text: "Shift"
Binary file added SimpleKeyboard/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions SimpleKeyboard/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.QLineEdit {
color: black;
}

.QPushButton {
color: black;
}

.QWidget {
background-color: white;
}
11 changes: 10 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ def btn_function(self, key, state):
hotkeys = config.read(key, 'hotkey')

mouse_ = ['RMB', 'LMB', 'MMB']
notkeyboard = mouse_
func = ['SK']

notkeyboard = mouse_ + func

for hotkey in list(map(str, hotkeys.split('+'))):
hotkey = Settings_UI.keyboard_keys[hotkey]
Expand All @@ -286,6 +288,13 @@ def btn_function(self, key, state):
time.sleep(0.01)
else:
mouse.release(mouse_keys[hotkey])

elif hotkey in func:
if hotkey == 'SK':
if state == 1:
test_process = threading.Thread(target=os.system, args=("cd SimpleKeyboard & TS2_SimpleKeyboard.exe", ), daemon=True)
test_process.start()
del test_process

except Exception:
logger.logging.error(traceback.format_exc().replace('"', '\''))
Expand Down
10 changes: 5 additions & 5 deletions modules/Configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, config_path):
'use_command': '0',
'use_hotkey': '1',
'command': '',
'hotkey': 'MIDDLE MOUSE BUTTON'
'hotkey': 'ENTER'
}
self.config['D_Pad_up'] = {
'use_command': '0',
Expand Down Expand Up @@ -89,9 +89,9 @@ def __init__(self, config_path):
}
self.config['RB'] = {
'use_command': '0',
'use_hotkey': '0',
'use_hotkey': '1',
'command': '',
'hotkey': 'No Key'
'hotkey': 'CTRL+V'
}
self.config['RT'] = {
'use_command': '0',
Expand All @@ -101,9 +101,9 @@ def __init__(self, config_path):
}
self.config['LB'] = {
'use_command': '0',
'use_hotkey': '0',
'use_hotkey': '1',
'command': '',
'hotkey': 'No Key'
'hotkey': 'SIMPLE KEYBOARD'
}
self.config['LT'] = {
'use_command': '0',
Expand Down
2 changes: 1 addition & 1 deletion ui templates/Settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,4 @@
</widget>
<resources/>
<connections/>
</ui>
</ui>
1 change: 1 addition & 0 deletions ui/Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Ui_SettingsWindow(QMainWindow):
'LEFT MOUSE BUTTON': 'LMB',
'MIDDLE MOUSE BUTTON': 'MMB',
'RIGHT MOUSE BUTTON': 'RMB',
'SIMPLE KEYBOARD': 'SK',
'ALT': 'alt',
'RIGHT ALT': 'right alt',
'BACKSPACE': 'backspace',
Expand Down

0 comments on commit 69bf101

Please sign in to comment.