Skip to content
Snippets Groups Projects
Commit 92653fe9 authored by Campbell Barton's avatar Campbell Barton
Browse files

Keymap search: check 'key_modifier' as well as 'type'

parent 21cb6283
No related branches found
No related tags found
No related merge requests found
......@@ -297,7 +297,15 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
# main filter func, runs many times
def filter_func(kmi):
for kk, ki in kmi_test_dict.items():
if getattr(kmi, kk) not in ki:
val = getattr(kmi, kk)
if val == 'NONE' or val not in ki:
# exception for 'type'
# also inspect 'key_modifier' as a fallback
if kk == "type":
val = getattr(kmi, "key_modifier")
if not (val == 'NONE' or val not in ki):
continue
return False
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment