Hi @ all,
i was wondering how i can define a function or if-statement which is called or proceded when a defined keyboard button (lets say “esc”) is hit?
import rhinoscriptsyntax as rs import Rhino as rhi if rhi.RhinoApp.EscapeKeyPressed is True: rs.MessageBox ("Center point of label was written to labelman_config.txt", buttons=0, title='Leaving Dialog')
But this does not work for me.
When I check what this element contains with
print "%s \n"%rhi.RhinoApp.EscapeKeyPressed
this gives me:
<IronPython.Runtime.Types.ReflectedEvent+BoundEvent object at 0x0000000000000080 [IronPython.Runtime.Types.ReflectedEvent+BoundEvent]>
I dont know how to handle this.
Thanks a lot for suggestions!