Closed uberkael closed 9 months ago
The keyboard
library requires to use root
on Linux (at least).
This can be avoided by replacing this line:
keyboard.add_hotkey(config["activation_key"], on_shortcut)
like here https://pynput.readthedocs.io/en/latest/keyboard.html#global-hotkeys
If this request (and pynput) is accepted it can help to deal with that.
Hi, thanks for your PR! Apologies for not reviewing it until now. I appreciate you fixing the issue with non-English keyboards! :)
I don't have the time to test on Linux (I created this project for my personal use and didn't expect anyone else to use it, haha!), but feel free to create another PR to change to using the pynput
global hotkeys instead!
Hi, Nice project!
I have a custom keyboard layout and
PyAutoGUI
can't handle some non-English keyboards (mine is not even a standard one) check here https://github.com/asweigart/pyautogui/issues/137. I did try some alternatives (like usingkeyboard
that is already imported) but I settled withpynput
. Because you were using some delay between keys I created a helper function but if for some reason it won't be needed it can be as simple as:pyinput_keyboard.type(transcribed_text)
I also had trouble with the sample rate (Linux Pipewire) but I solved it for another PR (maybe).
Thanks!