GHOST/Keymap: support for detecting repeat events
- Keymap items now have 'repeat' boolean which can be set to make keymap items respond to key repeat events or not. - Support for X11 & WIN32 (not macOS currently). This allows for the possibility to perform actions while a key is held and finish the action upon release. Thanks to @Severin for review and WIN32 support.
This commit is contained in:
@@ -184,6 +184,9 @@ def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
|
||||
if map_type == 'KEYBOARD':
|
||||
subrow.prop(kmi, "type", text="", event=True)
|
||||
subrow.prop(kmi, "value", text="")
|
||||
subrow_repeat = subrow.row(align=True)
|
||||
subrow_repeat.active = kmi.value in {'ANY', 'PRESS'}
|
||||
subrow_repeat.prop(kmi, "repeat", text="Repeat")
|
||||
elif map_type in {'MOUSE', 'NDOF'}:
|
||||
subrow.prop(kmi, "type", text="")
|
||||
subrow.prop(kmi, "value", text="")
|
||||
|
Reference in New Issue
Block a user