Keymap: pressing leader key (Alt) again closes tool prompt
Provides a convenient way to close if the tool prompt is opened by accident.
This commit is contained in:
@@ -1843,6 +1843,13 @@ class WM_OT_toolbar_prompt(Operator):
|
||||
context.workspace.status_text_set(None)
|
||||
return {'FINISHED'}
|
||||
|
||||
# Pressing entry even again exists, as long as it's not mapped to a key (for convenience).
|
||||
if event_type == self._init_event_type:
|
||||
if event_value == 'RELEASE':
|
||||
if not (event.ctrl or event.alt or event.shift or event.oskey):
|
||||
context.workspace.status_text_set(None)
|
||||
return {'CANCELLED'}
|
||||
|
||||
return {'RUNNING_MODAL'}
|
||||
|
||||
def invoke(self, context, event):
|
||||
|
||||
Reference in New Issue
Block a user