I would like to detect the state of some keys (shift, ctrl...) when the user is changing the value of a property in my addon in order to perform different actions. This would allow me to considerably extend the features available in the UI while keeping a limited set of graphic components.
My current use case is this: I have a FloatProperty exposed on my addon to control the start time of an event in the scene. When the user changes its value the event starts earlier or later, at the frame corresponding to this value. I would like to check if the Ctrl button is pressed when the user changes the value, and if it is the case I would like to force this value to be the current time (by using a set function for this property).
All I can find so far is related to the use of a modal operator and an Event. In my case here I strongly doubt I need to set the operator as modal.
Do you know how the state of the keyboard keys can be detected (in the Invoke or Execute function of my operator very likely)?