Aug-20-2019, 12:39 AM
Where can I find a list of Python keyboard and mouse keycodes and some basic code examples?
Linux Mint Cinnamon 22 - Python 3.12.3 - Autokey-gtk 0.96.0 as of 2024-01-13.
Python 3+ kybd and mouse control keycodes
|
Aug-20-2019, 12:39 AM
Where can I find a list of Python keyboard and mouse keycodes and some basic code examples?
Linux Mint Cinnamon 22 - Python 3.12.3 - Autokey-gtk 0.96.0 as of 2024-01-13.
Aug-20-2019, 05:03 AM
If you are looking for GUI automation with keyboard and mouse emulation, check Pywinauto library which has key codes
Check pynput and pyautogui packages.They are crossplatform. @Malt: OP is on Linux, so pywinauto will not do.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs
Aug-20-2019, 05:43 AM
Aug-20-2019, 06:07 AM
(Aug-20-2019, 05:43 AM)Malt Wrote: Sorry I missed out the platform :D Don't worry, the original question is ambiguous anyway and OP should provide more info to get relevant advice
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs
Aug-20-2019, 07:51 AM
I am using Python 3.6 in Linux Mint 19.2 with Autokey 3 which works well in every app, except it does not have mouse support yet.
With the Python keyboard and mouse keycodes I wanted to write a script to standardize the "open and switch to newly opened tab" action of Firefox and the Vivaldi browser. Firefox (and Chrome/Chromium) accomplishes this with the click of the mouse scroll wheel - a single handed operation. Vivaldi uses the combination of the <shift>+<left mouse click> for the same action - a two handed operation. I wondered if I can emulate this with Autokey and use it with Vivaldi.
Linux Mint Cinnamon 22 - Python 3.12.3 - Autokey-gtk 0.96.0 as of 2024-01-13.
|
|