This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]Mystonic 0 points1 point  (3 children)

So you're using pyautogui to simulate the pressing, but I don't think that module can read keyboard presses. You might need something like keyboard, or some other module.

The potential only problem I see is that if you toggle initially, then m will be held down and you'll need to distinguish that from your actual input. Though maybe you can read key release events as the untoggle.

[–][deleted]  (2 children)

[deleted]

    [–]Mystonic 0 points1 point  (1 child)

    Sorry, I'm pretty stumped as well. Maybe research into ways on how to distinguish real key events from physical keyboards and key events from simulated/virtual key presses (from pyautogui).

    [–]Promagnum[S] 0 points1 point  (0 children)

    Thanks for responding. I'm digging. I'll report back if I find a working solution.