Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
switch mouse buttons
#1
I realize this could this question could be tagged as "dumb",
but I am not familiair with Python yet, and before I dive into it I need to know if Python can do this:

question:
Is Python being able to switch mouse buttons? So left mouse button click functions as right-mouse button click, and vice versa?

As answers (for now), before I dive into Python myself would be:
"yes" , or "no"

additionaly "yes" accompanied by a small code example, would be appreciated.

Thanks
Reply
#2
Your mouse is being read by the operating system and the clicks and movements passed from that into your python programs. You could use python to change your OS's options or edit your registry (Windows) but that seems silly since it's much easier to just change it manually.

If you want it so the buttons are swapped just when you use your python program then you could intercept the mouse clicks and swap them using python modules like mouse or pynput.
Reply
#3
@marbelous:

thanks for the reaction. The point is I want to design/write a Python progam that will switch automatically at set intervals.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  best way to use switch case? korenron 8 2,929 Aug-18-2021, 03:16 PM
Last Post: naughtyCat
  How do I do this? Switch Case? mstichler 4 2,501 Jun-05-2020, 10:27 AM
Last Post: snippsat
  mouse 0.7.0 - mouse polling hate 125-1000hz penahuse 1 2,465 Dec-06-2019, 09:51 PM
Last Post: Larz60+
  switch limitations MuntyScruntfundle 3 2,337 Jan-27-2019, 06:11 PM
Last Post: aakashjha001
  Buttons or Radio Buttons on Tkinter Treeview draems 0 3,328 Oct-31-2017, 04:06 AM
Last Post: draems

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020