Detect pressed modifier key in inspector callback registered using set_time_inspector(when='hover')
#439
Replies: 1 comment
-
In PyQt6 you can get your keyboard modifiers like so:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi highfestiva,
First off, finplot is one of the most enchanting pieces of software I've used. It honestly feels like magic. Thank you so much for creating it!
I'm new to pyqtgraph in general, so I have a (hopefully) quick question. What would be the best way to detect whether a modifier key (shift, ctrl, alt) is pressed within an inspector callback?
My use case: I draw a horizontal arrow (using
pg.ArrowItem
) on the plot and want to be able to move it up or down using the mouse. I couldn't find a clean way of hooking into theFinViewBox.mouseDragEvent()
handler so I figured I could use an inspector for thehover
event to move the arrow as long as a modifier key is pressed - that would work just as well for my purposes!Beta Was this translation helpful? Give feedback.
All reactions