I want to read mouse left and right scroll click events and simulate them in Python in windows. I know I can detect and simulate the default ones such as middle mouse button, vertical and horizontal scroll using the virtual-key codes defined here:
https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
However, those do not correspond to the non-standardized so called "Repeat Scroll Left" and "Repeat Scroll Right" buttons on my Razer Basilisk V3 which I can activate by clicking the scroll wheel to the left and right. I have tried the AHK method to detect the key codes here with no luck:
https://superuser.com/a/1154645
How would I detect these click events on windows? Are there virtual-key codes for these buttons? If not how would I detect and simulate these buttons in Python ctypes?
Related
Question: Is it possible to use python to draw a box anywhere on the screen, outside of the application window.
Background:
I have some mouse/keyboard macros I use for work, programmed in python pyautogui, and have to make new ones and adjust them frequently. I would like my program to be such that I can use my mouse to draw a box over any part of my screen over any application window, and record the coordinates of the box for use within my macros. The box would be used as the selector, and would disappear once recorded. Basically the same thing as when you hold down your left mouse button on your desktop to select multiple icons, except I would just need the coordinates of the box to be returned for use in the macros (which I can already do with pyautogui).
Is it possible to draw outside of the canvas window? Perhaps there is a way to hide the canvas window without hiding the contents within it?
is there any way how I can scroll inside 'help' window in ptpython repl? When I type the name of a function a help opens at the bottom, but I don't know how i can scroll it up/down (or search inside it). Is this possible? I know about the repl.enable_mouse_support = True in which case i can scroll it via mouse. But this has also effect on copy/paste functionality and other behaviour related to mouse. I would like to just focus on the 'main' window and 'help' window and have the ability to scroll in it via keyboard.
I have a steelseries rival 3 mouse and it has macro buttons on the side of my mouse. How can I use these buttons while clicking in the pyautogui library? There is only left, right and middle click.
Is there a way to make the mouse move to certain coordinates and click inside of a window that might be in the background or behind another window without losing focus.
The idea is to let it work in the background while I'm using the computer for something else.
I'm working with Python on Windows 10.
I recently started using Bokeh. Overall I am very satisfied. One thing I find annoying though is that it seems I can only play with the left mouse button and need to manually switch tools everytime I want to pan/zoom/etc... It would be great if I could pan with left mouse buttom and zoom in with right mouse button. Is there a way to automatically 'switch' to zoom tool whenever right mouse button held, and switch back when left mouse button held?
Thanks!