'Hold' Key Event (specifically, the Spacebar key)

Hello all!

I have been trying my hand at creating the maya ‘hotbox’ radial menu in blender, and I have hit a roadblock when it comes to scripting for holding a key (that is not ctrl, alt, and shift). If anyone has any way of achieving a hold spacebar key event, even if it is a hack, I would be very grateful.

Additionally, any recent information regarding radial menus in blender would also be great.

Thank you!


I suppose you grab alt, ctrl and shift status with


Perhaps with event.type and event.value :event api doc
You could try something like:

def invoke(self, context, event):
     if event.type == 'SPACE' and event.value == 'PRESS':
        #do something
        return {'RUNNING_MODAL'}

def modal(self, context, event):
     #do something
     if event.type == 'SPACE' and event.value == 'RELEASE':
        # do something else
        return {'FINISHED'}  # or not...

That’s just me thinking out loud, so I’m not sure that it will work