Python. how use key and mouse event together

   911   1   0
User Avatar
Member
42 posts
Joined: March 2018
Offline
Hello,
I want to use z key with scroll mouse wheel to act something, but they are only available in deferent events.
I think i have to use return True to consume the event, but how can i use it from other events to access that, I don't find any informations about that.
Can you provide some simple example? Please help
Edited by Beka - Feb. 2, 2022 15:55:17
User Avatar
Member
42 posts
Joined: March 2018
Offline
I found a solution: create a class variable, which will be true if z key is press and isKeyDown(), and so that variable will be accessible in onMouseEvent() and everywhere
Edited by Beka - Feb. 5, 2022 08:36:56
  • Quick Links