Keymap: disable 'repeat' by default for keymap items

In practice, there are only a limited number of operations we need to
use repeat such as navigation, stepping operations that cycle states
and text input.

Now we don't need to disable repeat explicitly when a modal operator
uses checks for a key being held as was needed for 17cb2a6da0c88.

Repeat is now included in exported keymaps.

Use versioning so existing exported keymaps are loaded properly.
This commit is contained in:
Campbell Barton 2020-10-22 12:29:45 +11:00
parent 358a584985
commit f5080c82dd
4 changed files with 533 additions and 520 deletions

View File

@ -73,6 +73,11 @@ def kmi_args_as_data(kmi):
if kmi.key_modifier and kmi.key_modifier != 'NONE':
s.append(f"\"key_modifier\": '{kmi.key_modifier}'")
if kmi.repeat:
if kmi.map_type == 'KEYBOARD':
if kmi.value in {'PRESS', 'ANY'}:
s.append("\"repeat\": True")
return "{" + ", ".join(s) + "}"

View File

@ -237,7 +237,7 @@ def km_screen(params):
)
items.extend([
("screen.repeat_last", {"type": 'G', "value": 'PRESS'}, None),
("screen.repeat_last", {"type": 'G', "value": 'PRESS', "repeat": True}, None),
# Animation
("screen.userpref_show", {"type": 'COMMA', "value": 'PRESS', "ctrl": True}, None),
("screen.animation_step", {"type": 'TIMER0', "value": 'ANY', "any": True}, None),
@ -256,8 +256,8 @@ def km_screen(params):
("file.execute", {"type": 'NUMPAD_ENTER', "value": 'PRESS'}, None),
("file.cancel", {"type": 'ESC', "value": 'PRESS'}, None),
# Undo
("ed.undo", {"type": 'Z', "value": 'PRESS', "ctrl": True}, None),
("ed.redo", {"type": 'Z', "value": 'PRESS', "shift": True, "ctrl": True}, None),
("ed.undo", {"type": 'Z', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("ed.redo", {"type": 'Z', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True}, None),
("ed.undo_history", {"type": 'Z', "value": 'PRESS', "alt": True, "ctrl": True}, None),
# Render
("render.view_cancel", {"type": 'ESC', "value": 'PRESS'}, None),
@ -344,8 +344,8 @@ def km_view2d(params):
("view2d.zoom_in", {"type": 'WHEELINMOUSE', "value": 'PRESS'}, None),
("view2d.zoom_out", {"type": 'WHEELOUTMOUSE', "value": 'PRESS', "alt": True}, None),
("view2d.zoom_in", {"type": 'WHEELINMOUSE', "value": 'PRESS', "alt": True}, None),
("view2d.zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS'}, None),
("view2d.zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS'}, None),
("view2d.zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "repeat": True}, None),
("view2d.zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True}, None),
("view2d.zoom", {"type": 'TRACKPADPAN', "value": 'ANY', "ctrl": True}, None),
("view2d.smoothview", {"type": 'TIMER1', "value": 'ANY', "any": True}, None),
# Scroll up/down, only when zoom is not available.
@ -379,16 +379,16 @@ def km_view2d_buttons_list(params):
("view2d.pan", {"type": 'TRACKPADPAN', "value": 'ANY'}, None),
("view2d.scroll_down", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS'}, None),
("view2d.scroll_up", {"type": 'WHEELUPMOUSE', "value": 'PRESS'}, None),
("view2d.scroll_down", {"type": 'PAGE_DOWN', "value": 'PRESS'},
("view2d.scroll_down", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
{"properties": [("page", True)]}),
("view2d.scroll_up", {"type": 'PAGE_UP', "value": 'PRESS'},
("view2d.scroll_up", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
{"properties": [("page", True)]}),
# Zoom
("view2d.zoom", {"type": 'RIGHTMOUSE', "value": 'PRESS', "alt": True}, None),
("view2d.zoom", {"type": 'TRACKPADZOOM', "value": 'ANY'}, None),
("view2d.zoom", {"type": 'TRACKPADPAN', "value": 'ANY', "ctrl": True}, None),
("view2d.zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS'}, None),
("view2d.zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS'}, None),
("view2d.zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "repeat": True}, None),
("view2d.zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True}, None),
("view2d.reset", {"type": 'A', "value": 'PRESS'}, None),
])
@ -479,17 +479,21 @@ def km_outliner(params):
{"properties": [("tweak", True), ("mode", "ADD")]}),
("outliner.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY', "ctrl": True},
{"properties": [("tweak", True), ("mode", "SUB")]}),
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS'}, {"properties": [("direction", 'UP')]}),
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True},
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'UP')]}),
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'UP'), ("extend", True)]}),
("outliner.select_walk", {"type": 'DOWN_ARROW', "value": 'PRESS'}, {"properties": [("direction", 'DOWN')]}),
("outliner.select_walk", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True},
("outliner.select_walk", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'DOWN')]}),
("outliner.select_walk", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'DOWN'), ("extend", True)]}),
("outliner.select_walk", {"type": 'LEFT_ARROW', "value": 'PRESS'}, {"properties": [("direction", 'LEFT')]}),
("outliner.select_walk", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True},
("outliner.select_walk", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'LEFT')]}),
("outliner.select_walk", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'LEFT'), ("toggle_all", True)]}),
("outliner.select_walk", {"type": 'RIGHT_ARROW', "value": 'PRESS'}, {"properties": [("direction", 'RIGHT')]}),
("outliner.select_walk", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True},
("outliner.select_walk", {"type": 'RIGHT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'RIGHT')]}),
("outliner.select_walk", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'RIGHT'), ("toggle_all", True)]}),
("outliner.item_openclose", {"type": 'LEFTMOUSE', "value": 'CLICK'},
{"properties": [("all", False)]}),
@ -505,9 +509,9 @@ def km_outliner(params):
("outliner.show_hierarchy", {"type": 'A', "value": 'PRESS'}, None),
("outliner.show_active", {"type": 'PERIOD', "value": 'PRESS'}, None),
("outliner.show_active", {"type": 'F', "value": 'PRESS'}, None),
("outliner.scroll_page", {"type": 'PAGE_DOWN', "value": 'PRESS'},
("outliner.scroll_page", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
{"properties": [("up", False)]}),
("outliner.scroll_page", {"type": 'PAGE_UP', "value": 'PRESS'},
("outliner.scroll_page", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
{"properties": [("up", True)]}),
("outliner.show_one_level", {"type": 'NUMPAD_PLUS', "value": 'PRESS'}, None),
("outliner.show_one_level", {"type": 'NUMPAD_MINUS', "value": 'PRESS'},
@ -570,8 +574,8 @@ def km_uv_editor(params):
("uv.select_loop", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'},
{"properties": [("extend", False)]}),
("uv.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
("uv.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("uv.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("uv.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("uv.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("uv.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
("uv.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("uv.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
@ -649,9 +653,9 @@ def km_view3d(params):
("view3d.zoom", {"type": 'TRACKPADZOOM', "value": 'ANY'}, None),
("view3d.zoom", {"type": 'TRACKPADPAN', "value": 'ANY', "ctrl": True}, None),
# Numpad
("view3d.zoom", {"type": 'NUMPAD_PLUS', "value": 'PRESS'},
("view3d.zoom", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True},
{"properties": [("delta", 1)]}),
("view3d.zoom", {"type": 'NUMPAD_MINUS', "value": 'PRESS'},
("view3d.zoom", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "repeat": True},
{"properties": [("delta", -1)]}),
("view3d.zoom", {"type": 'WHEELINMOUSE', "value": 'PRESS'},
{"properties": [("delta", 1)]}),
@ -661,9 +665,9 @@ def km_view3d(params):
{"properties": [("delta", 1)]}),
("view3d.zoom", {"type": 'WHEELOUTMOUSE', "value": 'PRESS', "alt": True},
{"properties": [("delta", -1)]}),
("view3d.dolly", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "shift": True},
("view3d.dolly", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("delta", 1)]}),
("view3d.dolly", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "shift": True},
("view3d.dolly", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("delta", -1)]}),
("view3d.view_all", {"type": 'A', "value": 'PRESS'},
{"properties": [("center", False)]}),
@ -777,8 +781,8 @@ def km_mask_editing(params):
{"properties": [("mode", 'ADD')]}),
("mask.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True, "alt": True},
{"properties": [("mode", 'SUB')]}),
("mask.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("mask.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("mask.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("mask.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("mask.hide_view_clear", {"type": 'H', "value": 'PRESS', "alt": True}, None),
("mask.hide_view_set", {"type": 'H', "value": 'PRESS', "ctrl": True},
{"properties": [("unselected", False)]}),
@ -903,8 +907,8 @@ def km_graph_editor(params):
{"properties":[("tweak", True), ("axis_range", False), ("mode", 'ADD')]}),
("graph.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY', "ctrl": True},
{"properties":[("tweak", True), ("axis_range", False), ("mode", 'SUB')]}),
("graph.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("graph.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("graph.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("graph.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("graph.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
op_menu("GRAPH_MT_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}),
op_menu("GRAPH_MT_delete", {"type": 'DEL', "value": 'PRESS'}),
@ -982,8 +986,8 @@ def km_image(params):
("image.view_zoom_out", {"type": 'WHEELOUTMOUSE', "value": 'PRESS'}, None),
("image.view_zoom_in", {"type": 'WHEELINMOUSE', "value": 'PRESS', "alt": True}, None),
("image.view_zoom_out", {"type": 'WHEELOUTMOUSE', "value": 'PRESS', "alt": True}, None),
("image.view_zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS'}, None),
("image.view_zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS'}, None),
("image.view_zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True}, None),
("image.view_zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "repeat": True}, None),
("image.view_zoom", {"type": 'RIGHTMOUSE', "value": 'PRESS', "alt": True}, None),
("image.view_zoom", {"type": 'TRACKPADZOOM', "value": 'ANY'}, None),
("image.view_zoom", {"type": 'TRACKPADPAN', "value": 'ANY', "ctrl": True}, None),
@ -1213,17 +1217,17 @@ def km_file_browser(params):
("wm.context_toggle", {"type": 'T', "value": 'PRESS'},
{"properties": [("data_path", 'space_data.show_region_toolbar')]}),
("file.bookmark_add", {"type": 'B', "value": 'PRESS', "ctrl": True}, None),
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS'},
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True},
{"properties": [("increment", 1)]}),
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "shift": True},
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("increment", 10)]}),
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True},
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("increment", 100)]}),
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS'},
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "repeat": True},
{"properties": [("increment", -1)]}),
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "shift": True},
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("increment", -10)]}),
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True},
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("increment", -100)]}),
*_template_items_context_menu("FILEBROWSER_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
])
@ -1301,17 +1305,17 @@ def km_file_browser_buttons(params):
)
items.extend([
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS'},
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True},
{"properties": [("increment", 1)]}),
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "shift": True},
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("increment", 10)]}),
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True},
("file.filenum", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("increment", 100)]}),
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS'},
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "repeat": True},
{"properties": [("increment", -1)]}),
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "shift": True},
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("increment", -10)]}),
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True},
("file.filenum", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("increment", -100)]}),
])
@ -1385,8 +1389,8 @@ def km_dopesheet(params):
{"properties": [("mode", 'MARKERS_COLUMN')]}),
("action.select_column", {"type": 'K', "value": 'PRESS', "alt": True},
{"properties": [("mode", 'MARKERS_BETWEEN')]}),
("action.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True}, None),
("action.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "ctrl": True}, None),
("action.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("action.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("action.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
("action.frame_jump", {"type": 'G', "value": 'PRESS', "ctrl": True}, None),
("wm.context_menu_enum", {"type": 'X', "value": 'PRESS'},
@ -1584,9 +1588,9 @@ def km_text(params):
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
("wm.context_cycle_int", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True},
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True},
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True},
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
("text.new", {"type": 'N', "value": 'PRESS', "ctrl": True}, None),
])
@ -1603,16 +1607,16 @@ def km_text(params):
("text.cut", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
("text.copy", {"type": 'INSERT', "value": 'PRESS', "ctrl": True}, None),
("text.paste", {"type": 'INSERT', "value": 'PRESS', "shift": True}, None),
("text.duplicate_line", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
("text.duplicate_line", {"type": 'D', "value": 'PRESS', "ctrl": True, "repeat": True}, None),
("text.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, None),
("text.select_line", {"type": 'A', "value": 'PRESS', "shift": True, "ctrl": True}, None),
("text.select_word", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None),
("text.move_lines", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("text.move_lines", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("direction", 'UP')]}),
("text.move_lines", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("text.move_lines", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("direction", 'DOWN')]}),
("text.indent_or_autocomplete", {"type": 'TAB', "value": 'PRESS'}, None),
("text.unindent", {"type": 'TAB', "value": 'PRESS', "shift": True}, None),
("text.indent_or_autocomplete", {"type": 'TAB', "value": 'PRESS', "repeat": True}, None),
("text.unindent", {"type": 'TAB', "value": 'PRESS', "shift": True, "repeat": True}, None),
("text.uncomment", {"type": 'D', "value": 'PRESS', "shift": True, "ctrl": True}, None),
("text.move", {"type": 'HOME', "value": 'PRESS'},
{"properties": [("type", 'LINE_BEGIN')]}),
@ -1622,21 +1626,21 @@ def km_text(params):
{"properties": [("type", 'LINE_END')]}),
("text.move", {"type": 'E', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("type", 'LINE_END')]}),
("text.move", {"type": 'LEFT_ARROW', "value": 'PRESS'},
("text.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("text.move", {"type": 'RIGHT_ARROW', "value": 'PRESS'},
("text.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_CHARACTER')]}),
("text.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True},
("text.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
("text.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True},
("text.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("text.move", {"type": 'UP_ARROW', "value": 'PRESS'},
("text.move", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_LINE')]}),
("text.move", {"type": 'DOWN_ARROW', "value": 'PRESS'},
("text.move", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_LINE')]}),
("text.move", {"type": 'PAGE_UP', "value": 'PRESS'},
("text.move", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_PAGE')]}),
("text.move", {"type": 'PAGE_DOWN', "value": 'PRESS'},
("text.move", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_PAGE')]}),
("text.move", {"type": 'HOME', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'FILE_TOP')]}),
@ -1646,33 +1650,33 @@ def km_text(params):
{"properties": [("type", 'LINE_BEGIN')]}),
("text.move_select", {"type": 'END', "value": 'PRESS', "shift": True},
{"properties": [("type", 'LINE_END')]}),
("text.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True},
("text.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("text.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True},
("text.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'NEXT_CHARACTER')]}),
("text.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("text.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
("text.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("text.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("text.move_select", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True},
("text.move_select", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_LINE')]}),
("text.move_select", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True},
("text.move_select", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'NEXT_LINE')]}),
("text.move_select", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True},
("text.move_select", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_PAGE')]}),
("text.move_select", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True},
("text.move_select", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'NEXT_PAGE')]}),
("text.move_select", {"type": 'HOME', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("type", 'FILE_TOP')]}),
("text.move_select", {"type": 'END', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("type", 'FILE_BOTTOM')]}),
("text.delete", {"type": 'DEL', "value": 'PRESS'},
("text.delete", {"type": 'DEL', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_CHARACTER')]}),
("text.delete", {"type": 'BACK_SPACE', "value": 'PRESS'},
("text.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("text.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True},
("text.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("text.delete", {"type": 'DEL', "value": 'PRESS', "ctrl": True},
("text.delete", {"type": 'DEL', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("text.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
@ -1688,11 +1692,11 @@ def km_text(params):
{"properties": [("lines", -1)]}),
("text.scroll", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS'},
{"properties": [("lines", 1)]}),
("text.line_break", {"type": 'RET', "value": 'PRESS'}, None),
("text.line_break", {"type": 'NUMPAD_ENTER', "value": 'PRESS'}, None),
("text.line_break", {"type": 'RET', "value": 'PRESS', "repeat": True}, None),
("text.line_break", {"type": 'NUMPAD_ENTER', "value": 'PRESS', "repeat": True}, None),
*_template_items_context_menu("TEXT_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}),
("text.line_number", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
("text.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
("text.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True, "repeat": True}, None),
])
return keymap
@ -1759,17 +1763,17 @@ def km_sequencer(params):
("sequencer.view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
("sequencer.view_selected", {"type": 'F', "value": 'PRESS'}, None),
("sequencer.view_frame", {"type": 'NUMPAD_0', "value": 'PRESS'}, None),
("sequencer.strip_jump", {"type": 'PAGE_UP', "value": 'PRESS'},
("sequencer.strip_jump", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
{"properties": [("next", True), ("center", False)]}),
("sequencer.strip_jump", {"type": 'PAGE_DOWN', "value": 'PRESS'},
("sequencer.strip_jump", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
{"properties": [("next", False), ("center", False)]}),
("sequencer.strip_jump", {"type": 'PAGE_UP', "value": 'PRESS', "alt": True},
("sequencer.strip_jump", {"type": 'PAGE_UP', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("next", True), ("center", True)]}),
("sequencer.strip_jump", {"type": 'PAGE_DOWN', "value": 'PRESS', "alt": True},
("sequencer.strip_jump", {"type": 'PAGE_DOWN', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("next", False), ("center", True)]}),
("sequencer.swap", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True},
("sequencer.swap", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("side", 'LEFT')]}),
("sequencer.swap", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True},
("sequencer.swap", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("side", 'RIGHT')]}),
("sequencer.gap_remove", {"type": 'BACK_SPACE', "value": 'PRESS'},
{"properties": [("all", False)]}),
@ -1797,8 +1801,8 @@ def km_sequencer(params):
{"properties": [("side_of_frame", True), ("linked_time", True)]}),
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("extend", True), ("side_of_frame", True), ("linked_time", True)]}),
("sequencer.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("sequencer.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("sequencer.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("sequencer.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("sequencer.select_linked_pick", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
{"properties": [("extend", False)]}),
("sequencer.select_linked_pick", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True},
@ -1860,9 +1864,9 @@ def km_console(params):
)
items.extend([
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True},
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
("console.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True},
("console.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("console.move", {"type": 'HOME', "value": 'PRESS'},
{"properties": [("type", 'LINE_BEGIN')]}),
@ -1872,27 +1876,27 @@ def km_console(params):
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
("wm.context_cycle_int", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "ctrl": True},
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True},
("wm.context_cycle_int", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("data_path", 'space_data.font_size'), ("reverse", False)]}),
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True},
("wm.context_cycle_int", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("data_path", 'space_data.font_size'), ("reverse", True)]}),
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS'},
("console.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("console.move", {"type": 'RIGHT_ARROW', "value": 'PRESS'},
("console.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_CHARACTER')]}),
("console.history_cycle", {"type": 'UP_ARROW', "value": 'PRESS'},
("console.history_cycle", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("reverse", True)]}),
("console.history_cycle", {"type": 'DOWN_ARROW', "value": 'PRESS'},
("console.history_cycle", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("reverse", False)]}),
("console.delete", {"type": 'DEL', "value": 'PRESS'},
("console.delete", {"type": 'DEL', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_CHARACTER')]}),
("console.delete", {"type": 'BACK_SPACE', "value": 'PRESS'},
("console.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("console.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("console.delete", {"type": 'DEL', "value": 'PRESS', "ctrl": True},
("console.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')], "repeat": True}),
("console.delete", {"type": 'DEL', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("console.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True},
("console.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
("console.clear_line", {"type": 'RET', "value": 'PRESS', "shift": True}, None),
("console.clear_line", {"type": 'NUMPAD_ENTER', "value": 'PRESS', "shift": True}, None),
@ -1905,12 +1909,12 @@ def km_console(params):
("console.paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None),
("console.select_set", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
("console.select_word", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None),
("console.insert", {"type": 'TAB', "value": 'PRESS', "ctrl": True},
("console.insert", {"type": 'TAB', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("text", '\t')]}),
("console.indent_or_autocomplete", {"type": 'TAB', "value": 'PRESS'}, None),
("console.unindent", {"type": 'TAB', "value": 'PRESS', "shift": True}, None),
("console.indent_or_autocomplete", {"type": 'TAB', "value": 'PRESS', "repeat": True}, None),
("console.unindent", {"type": 'TAB', "value": 'PRESS', "shift": True, "repeat": True}, None),
*_template_items_context_menu("CONSOLE_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
("console.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True}, None),
("console.insert", {"type": 'TEXTINPUT', "value": 'ANY', "any": True, "repeat": True}, None),
])
return keymap
@ -1928,9 +1932,9 @@ def km_clip(params):
op_panel("TOPBAR_PT_name", {"type": 'RET', "value": 'PRESS'}, [("keep_open", False)]),
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
("clip.open", {"type": 'O', "value": 'PRESS', "alt": True}, None),
("clip.track_markers", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True},
("clip.track_markers", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("backwards", True), ("sequence", False)]}),
("clip.track_markers", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True},
("clip.track_markers", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("backwards", False), ("sequence", False)]}),
("clip.track_markers", {"type": 'T', "value": 'PRESS', "ctrl": True},
{"properties": [("backwards", False), ("sequence", True)]}),
@ -1965,8 +1969,8 @@ def km_clip_editor(params):
("clip.view_zoom_out", {"type": 'WHEELOUTMOUSE', "value": 'PRESS'}, None),
("clip.view_zoom_in", {"type": 'WHEELINMOUSE', "value": 'PRESS', "alt": True}, None),
("clip.view_zoom_out", {"type": 'WHEELOUTMOUSE', "value": 'PRESS', "alt": True}, None),
("clip.view_zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS'}, None),
("clip.view_zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS'}, None),
("clip.view_zoom_in", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "repeat": True}, None),
("clip.view_zoom_out", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "repeat": True}, None),
("clip.view_zoom_ratio", {"type": 'NUMPAD_8', "value": 'PRESS', "ctrl": True},
{"properties": [("ratio", 8.0)]}),
("clip.view_zoom_ratio", {"type": 'NUMPAD_4', "value": 'PRESS', "ctrl": True},
@ -1991,13 +1995,13 @@ def km_clip_editor(params):
("clip.view_selected", {"type": 'F', "value": 'PRESS'}, None),
("clip.view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
("clip.view_ndof", {"type": 'NDOF_MOTION', "value": 'ANY'}, None),
("clip.frame_jump", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("clip.frame_jump", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("position", 'PATHSTART')]}),
("clip.frame_jump", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("clip.frame_jump", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("position", 'PATHEND')]}),
("clip.frame_jump", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "alt": True},
("clip.frame_jump", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "alt": True, "repeat": True},
{"properties": [("position", 'FAILEDPREV')]}),
("clip.frame_jump", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "alt": True},
("clip.frame_jump", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "alt": True, "repeat": True},
{"properties": [("position", 'PATHSTART')]}),
("clip.change_frame", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
("clip.select", {"type": 'LEFTMOUSE', "value": 'PRESS'},
@ -2139,7 +2143,7 @@ def km_frames(params):
{"properties": [("end", True)]}),
("screen.frame_jump", {"type": 'MEDIA_FIRST', "value": 'PRESS'},
{"properties": [("end", False)]}),
("screen.animation_play", {"type": 'SPACE', "value": 'PRESS', "repeat": False}, None),
("screen.animation_play", {"type": 'SPACE', "value": 'PRESS'}, None),
("screen.animation_cancel", {"type": 'ESC', "value": 'PRESS'}, None),
("screen.animation_play", {"type": 'MEDIA_PLAY', "value": 'PRESS'}, None),
("screen.animation_cancel", {"type": 'MEDIA_STOP', "value": 'PRESS'}, None),
@ -2214,9 +2218,9 @@ def km_animation_channels(params):
("anim.channels_collapse", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True},
{"properties": [("all", False)]}),
# Move.
("anim.channels_move", {"type": 'PAGE_UP', "value": 'PRESS'},
("anim.channels_move", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'UP')]}),
("anim.channels_move", {"type": 'PAGE_DOWN', "value": 'PRESS'},
("anim.channels_move", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'DOWN')]}),
("anim.channels_move", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True},
{"properties": [("direction", 'TOP')]}),
@ -2268,8 +2272,8 @@ def _grease_pencil_selection(params):
# Select grouped
("gpencil.select_grouped", {"type": 'G', "value": 'PRESS', "shift": True}, None),
# Select more/less
("gpencil.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("gpencil.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("gpencil.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("gpencil.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
]
@ -2957,13 +2961,13 @@ def km_pose(params):
("pose.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("pose.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("pose.select_parent", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True}, None),
("pose.select_hierarchy", {"type": 'UP_ARROW', "value": 'PRESS'},
("pose.select_hierarchy", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'PARENT'), ("extend", False)]}),
("pose.select_hierarchy", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True},
("pose.select_hierarchy", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'PARENT'), ("extend", True)]}),
("pose.select_hierarchy", {"type": 'DOWN_ARROW', "value": 'PRESS'},
("pose.select_hierarchy", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'CHILD'), ("extend", False)]}),
("pose.select_hierarchy", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True},
("pose.select_hierarchy", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'CHILD'), ("extend", True)]}),
("pose.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
("pose.bone_layers", {"type": 'G', "value": 'PRESS'}, None),
@ -3007,16 +3011,16 @@ def km_object_mode(params):
("object.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
("object.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("object.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("object.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("object.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("object.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("object.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("object.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
("object.select_hierarchy", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
("object.select_hierarchy", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'PARENT'), ("extend", False)]}),
("object.select_hierarchy", {"type": 'LEFT_BRACKET', "value": 'PRESS', "shift": True},
("object.select_hierarchy", {"type": 'LEFT_BRACKET', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'PARENT'), ("extend", True)]}),
("object.select_hierarchy", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
("object.select_hierarchy", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'CHILD'), ("extend", False)]}),
("object.select_hierarchy", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True},
("object.select_hierarchy", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("direction", 'CHILD'), ("extend", True)]}),
("object.parent_set", {"type": 'P', "value": 'PRESS'}, None),
@ -3113,8 +3117,8 @@ def km_curve(params):
("curve.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("curve.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("curve.select_row", {"type": 'R', "value": 'PRESS', "shift": True}, None),
("curve.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("curve.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("curve.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("curve.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("curve.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
("curve.shortest_path_pick", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True, "shift": True}, None),
("curve.duplicate_move", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
@ -3208,9 +3212,9 @@ def km_image_paint(params):
("paint.sample_color", {"type": 'I', "value": 'PRESS'}, None),
("paint.brush_colors_flip", {"type": 'X', "value": 'PRESS'}, None),
("paint.grab_clone", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 0.9)]}),
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 1.0 / 0.9)]}),
*_template_paint_radial_control("image_paint", color=True, zoom=True, rotation=True, secondary_rotation=True),
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS'},
@ -3258,9 +3262,9 @@ def km_vertex_paint(params):
("paint.vertex_paint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
{"properties": [("mode", 'INVERT')]}),
("paint.brush_colors_flip", {"type": 'X', "value": 'PRESS'}, None),
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 0.9)]}),
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 1.0 / 0.9)]}),
*_template_paint_radial_control("vertex_paint", color=True, rotation=True),
("brush.stencil_control", {"type": 'RIGHTMOUSE', "value": 'PRESS'},
@ -3303,9 +3307,9 @@ def km_weight_paint(params):
items.extend([
("paint.weight_paint", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
("paint.weight_sample_group", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, None),
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 0.9)]}),
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 1.0 / 0.9)]}),
*_template_paint_radial_control("weight_paint"),
("wm.context_toggle", {"type": 'M', "value": 'PRESS'},
@ -3354,9 +3358,9 @@ def km_sculpt(params):
{"properties": [("action", 'SHOW'), ("area", 'ALL')]}),
# Subdivision levels
*_template_items_object_subdivision_set(),
("object.subdivision_set", {"type": 'PAGE_UP', "value": 'PRESS'},
("object.subdivision_set", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
{"properties": [("level", 1), ("relative", True)]}),
("object.subdivision_set", {"type": 'PAGE_DOWN', "value": 'PRESS'},
("object.subdivision_set", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
{"properties": [("level", -1), ("relative", True)]}),
# Mask
("paint.mask_flood_fill", {"type": 'A', "value": 'PRESS', "ctrl": True},
@ -3379,9 +3383,9 @@ def km_sculpt(params):
("object.voxel_size_edit", {"type": 'R', "value": 'PRESS', "shift": True}, None),
("object.quadriflow_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True, "alt": True}, None),
# Brush properties
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 0.9)]}),
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 1.0 / 0.9)]}),
*_template_paint_radial_control("sculpt", rotation=True),
# Stencil
@ -3467,8 +3471,8 @@ def km_mesh(params):
("mesh.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
("mesh.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("mesh.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("mesh.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("mesh.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("mesh.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("mesh.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("mesh.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
*_template_items_editmode_mesh_select_mode(params),
@ -3535,8 +3539,8 @@ def km_armature(params):
("armature.select_hierarchy", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True},
{"properties": [("direction", 'CHILD'), ("extend", True)]}),
("armature.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("armature.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("armature.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("armature.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("armature.select_similar", {"type": 'G', "value": 'PRESS', "shift": True}, None),
("armature.select_linked_pick", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
@ -3608,8 +3612,8 @@ def km_lattice(params):
("lattice.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
("lattice.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("lattice.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("lattice.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("lattice.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("lattice.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("lattice.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("object.vertex_parent_set", {"type": 'P', "value": 'PRESS', "ctrl": True}, None),
*_template_items_context_menu("VIEW3D_MT_edit_lattice_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
@ -3639,8 +3643,8 @@ def km_particle(params):
("particle.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
("particle.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("particle.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("particle.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("particle.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None),
("particle.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("particle.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("particle.select_linked_pick", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
{"properties": [("deselect", False)]}),
("particle.select_linked_pick", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True},
@ -3685,63 +3689,63 @@ def km_font(params):
{"properties": [("style", 'UNDERLINE')]}),
("font.style_toggle", {"type": 'P', "value": 'PRESS', "ctrl": True},
{"properties": [("style", 'SMALL_CAPS')]}),
("font.delete", {"type": 'DEL', "value": 'PRESS'},
("font.delete", {"type": 'DEL', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_OR_SELECTION')]}),
("font.delete", {"type": 'DEL', "value": 'PRESS', "ctrl": True},
("font.delete", {"type": 'DEL', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("font.delete", {"type": 'BACK_SPACE', "value": 'PRESS'},
("font.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_OR_SELECTION')]}),
("font.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True},
("font.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_OR_SELECTION')]}),
("font.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True},
("font.delete", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
("font.move", {"type": 'HOME', "value": 'PRESS'},
{"properties": [("type", 'LINE_BEGIN')]}),
("font.move", {"type": 'END', "value": 'PRESS'},
{"properties": [("type", 'LINE_END')]}),
("font.move", {"type": 'LEFT_ARROW', "value": 'PRESS'},
("font.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("font.move", {"type": 'RIGHT_ARROW', "value": 'PRESS'},
("font.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_CHARACTER')]}),
("font.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True},
("font.move", {"type": 'LEFT_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
("font.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True},
("font.move", {"type": 'RIGHT_ARROW', "value": 'PRESS', "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("font.move", {"type": 'UP_ARROW', "value": 'PRESS'},
("font.move", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_LINE')]}),
("font.move", {"type": 'DOWN_ARROW', "value": 'PRESS'},
("font.move", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_LINE')]}),
("font.move", {"type": 'PAGE_UP', "value": 'PRESS'},
("font.move", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'PREVIOUS_PAGE')]}),
("font.move", {"type": 'PAGE_DOWN', "value": 'PRESS'},
("font.move", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'NEXT_PAGE')]}),
("font.move_select", {"type": 'HOME', "value": 'PRESS', "shift": True},
{"properties": [("type", 'LINE_BEGIN')]}),
("font.move_select", {"type": 'END', "value": 'PRESS', "shift": True},
{"properties": [("type", 'LINE_END')]}),
("font.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True},
("font.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_CHARACTER')]}),
("font.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True},
("font.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'NEXT_CHARACTER')]}),
("font.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("font.move_select", {"type": 'LEFT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_WORD')]}),
("font.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True},
("font.move_select", {"type": 'RIGHT_ARROW', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": True},
{"properties": [("type", 'NEXT_WORD')]}),
("font.move_select", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True},
("font.move_select", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_LINE')]}),
("font.move_select", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True},
("font.move_select", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'NEXT_LINE')]}),
("font.move_select", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True},
("font.move_select", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'PREVIOUS_PAGE')]}),
("font.move_select", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True},
("font.move_select", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'NEXT_PAGE')]}),
("font.change_spacing", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True},
("font.change_spacing", {"type": 'LEFT_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("delta", -1)]}),
("font.change_spacing", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True},
("font.change_spacing", {"type": 'RIGHT_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("delta", 1)]}),
("font.change_character", {"type": 'UP_ARROW', "value": 'PRESS', "alt": True},
("font.change_character", {"type": 'UP_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("delta", 1)]}),
("font.change_character", {"type": 'DOWN_ARROW', "value": 'PRESS', "alt": True},
("font.change_character", {"type": 'DOWN_ARROW', "value": 'PRESS', "alt": True, "repeat": True},
{"properties": [("delta", -1)]}),
("font.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, None),
("font.text_copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
@ -3916,10 +3920,10 @@ def km_transform_modal_map(_params):
("ADD_SNAP", {"type": 'A', "value": 'PRESS'}, None),
("ADD_SNAP", {"type": 'A', "value": 'PRESS', "ctrl": True}, None),
("REMOVE_SNAP", {"type": 'A', "value": 'PRESS', "alt": True}, None),
("PROPORTIONAL_SIZE_UP", {"type": 'PAGE_UP', "value": 'PRESS'}, None),
("PROPORTIONAL_SIZE_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS'}, None),
("PROPORTIONAL_SIZE_UP", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True}, None),
("PROPORTIONAL_SIZE_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True}, None),
("PROPORTIONAL_SIZE_UP", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True}, None),
("PROPORTIONAL_SIZE_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True}, None),
("PROPORTIONAL_SIZE_UP", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True, "repeat": True}, None),
("PROPORTIONAL_SIZE_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True, "repeat": True}, None),
("PROPORTIONAL_SIZE_UP", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS'}, None),
("PROPORTIONAL_SIZE_DOWN", {"type": 'WHEELUPMOUSE', "value": 'PRESS'}, None),
("PROPORTIONAL_SIZE_UP", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True}, None),
@ -3927,10 +3931,10 @@ def km_transform_modal_map(_params):
("PROPORTIONAL_SIZE", {"type": 'TRACKPADPAN', "value": 'ANY'}, None),
("EDGESLIDE_EDGE_NEXT", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "alt": True}, None),
("EDGESLIDE_PREV_NEXT", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "alt": True}, None),
("AUTOIK_CHAIN_LEN_UP", {"type": 'PAGE_UP', "value": 'PRESS'}, None),
("AUTOIK_CHAIN_LEN_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS'}, None),
("AUTOIK_CHAIN_LEN_UP", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True}, None),
("AUTOIK_CHAIN_LEN_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True}, None),
("AUTOIK_CHAIN_LEN_UP", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True}, None),
("AUTOIK_CHAIN_LEN_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "repeat": True}, None),
("AUTOIK_CHAIN_LEN_UP", {"type": 'PAGE_UP', "value": 'PRESS', "shift": True, "repeat": True}, None),
("AUTOIK_CHAIN_LEN_DOWN", {"type": 'PAGE_DOWN', "value": 'PRESS', "shift": True, "repeat": True}, None),
("AUTOIK_CHAIN_LEN_UP", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS'}, None),
("AUTOIK_CHAIN_LEN_DOWN", {"type": 'WHEELUPMOUSE', "value": 'PRESS'}, None),
("AUTOIK_CHAIN_LEN_UP", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True}, None),

View File

@ -1135,7 +1135,7 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_boolean(func, "alt", 0, "Alt", "");
RNA_def_boolean(func, "oskey", 0, "OS Key", "");
RNA_def_enum(func, "key_modifier", rna_enum_event_type_items, 0, "Key Modifier", "");
RNA_def_boolean(func, "repeat", true, "Repeat", "When set, accept key-repeat events");
RNA_def_boolean(func, "repeat", false, "Repeat", "When set, accept key-repeat events");
RNA_def_boolean(func,
"head",
0,
@ -1159,7 +1159,7 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_boolean(func, "alt", 0, "Alt", "");
RNA_def_boolean(func, "oskey", 0, "OS Key", "");
RNA_def_enum(func, "key_modifier", rna_enum_event_type_items, 0, "Key Modifier", "");
RNA_def_boolean(func, "repeat", true, "Repeat", "When set, accept key-repeat events");
RNA_def_boolean(func, "repeat", false, "Repeat", "When set, accept key-repeat events");
parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
RNA_def_function_return(func, parm);