DustinR
1
listening for wheel_down
works just fine, e.g.: base.accept('wheel_down', lambda: self.inc_near_clip(1))
however, listening for shift+wheel_down does not ever trigger: base.accept('shift-wheel_down', lambda: self.inc_near_clip(10))
Any ideas? Is shift
not composable with wheel_down
? Shift does work fine with mouse1
e.g.: base.accept("shift-mouse1", self.create_landmark)
That’s strange. The following code works for me when I roll down the mouse wheel while holding down the shift
key:
from direct.showbase.ShowBase import ShowBase
base = ShowBase()
base.accept("shift-wheel_down", lambda: print("Wheel down!"))
#base.messenger.toggle_verbose()
base.run()
You could print out all events being thrown by calling base.messenger.toggle_verbose
; perhaps doing so could shed some light on what’s happening.
DustinR
3
Interesting. Your minimal example does not work for me on MacOS, but works fine on Windows. So, it looks like it’s just an OS-specific bug.
rdb
4
I have a suspicion of what might be the cause, can you try this:
- Hold shift down
- Press any regular key (eg. A)
- Roll the mouse wheel
- Release shift
Does shift-wheel_up/down fire in this scenario?