PyUserInput icon indicating copy to clipboard operation
PyUserInput copied to clipboard

Prevent Keyboard Actions while still listening

Open ranji2612 opened this issue 10 years ago • 4 comments

Hi, Is it possible to listen to user's keyboard actions using pyKeyboard but does not allow the system to react to the actions.

For example, say the user pressed ALT + TAB.. We have to detect that he pressed those buttons, but we should prevent the system to take action for the ALT+TAB.. Like the PyHook for instance..

Thanks in Advance..

ranji2612 avatar Jun 02 '14 10:06 ranji2612

@ranji2612 That feature in PyKeyboardEvent still requires some development, it is planned but not yet implemented.

SavinaRoja avatar Jun 04 '14 20:06 SavinaRoja

@SavinaRoja Is the same feature available for PyMouse ?

ranji2612 avatar Jun 05 '14 03:06 ranji2612

That feature is implemented in PyMouseEvent with the capture and capture_move instantiation arguments.

Sorry, that I took a while to respond, I must have closed the tab before submitting my reply.

SavinaRoja avatar Jun 10 '14 19:06 SavinaRoja

Oh awesome that it can do this. I want to write something to help me with a video game and if I move my mouse around while my macro is working it will click and copy text from somewhere else.

Savina, could you help me with a simple example of that PyMouseEvent instantiation?

class blabblablal(PyMouseEvent(capture_move=True)):??

I used PyMouseEvent to get position while clicking already, but my main loop uses pymouse. commands" I guess I should change the loop to put everything to a PyMouseEvent Class object and put it in a hang while doing it's thing.

Thanks for the module!!

forevertheuni avatar Sep 21 '15 19:09 forevertheuni