Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/presets/keyconfig/keymap_data/blender_default.py
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | if params.legacy: | ||||
| ("wm.append", {"type": 'F1', "value": 'PRESS', "shift": True}, None), | ("wm.append", {"type": 'F1', "value": 'PRESS', "shift": True}, None), | ||||
| ("wm.save_mainfile", {"type": 'W', "value": 'PRESS', "ctrl": True}, None), | ("wm.save_mainfile", {"type": 'W', "value": 'PRESS', "ctrl": True}, None), | ||||
| ("wm.save_as_mainfile", {"type": 'F2', "value": 'PRESS'}, None), | ("wm.save_as_mainfile", {"type": 'F2', "value": 'PRESS'}, None), | ||||
| ("wm.save_as_mainfile", {"type": 'S', "value": 'PRESS', "ctrl": True, "alt": True}, | ("wm.save_as_mainfile", {"type": 'S', "value": 'PRESS', "ctrl": True, "alt": True}, | ||||
| {"properties": [("copy", True)]}), | {"properties": [("copy", True)]}), | ||||
| ("wm.window_new", {"type": 'W', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ("wm.window_new", {"type": 'W', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ||||
| ("wm.window_fullscreen_toggle", {"type": 'F11', "value": 'PRESS', "alt": True}, None), | ("wm.window_fullscreen_toggle", {"type": 'F11', "value": 'PRESS', "alt": True}, None), | ||||
| ("wm.doc_view_manual_ui_context", {"type": 'F1', "value": 'PRESS', "alt": True}, None), | ("wm.doc_view_manual_ui_context", {"type": 'F1', "value": 'PRESS', "alt": True}, None), | ||||
| ("wm.search_menu", {"type": 'SPACE', "value": 'PRESS'}, None), | ("wm.search_menu", {"type": 'SPACE', "value": 'PRESS', "repeat": False}, None), | ||||
| ("wm.redraw_timer", {"type": 'T', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ("wm.redraw_timer", {"type": 'T', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ||||
| ("wm.debug_menu", {"type": 'D', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ("wm.debug_menu", {"type": 'D', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ||||
| ]) | ]) | ||||
| items.extend([ | items.extend([ | ||||
| # File operations | # File operations | ||||
| op_menu("TOPBAR_MT_file_new", {"type": 'N', "value": 'PRESS', "ctrl": True}), | op_menu("TOPBAR_MT_file_new", {"type": 'N', "value": 'PRESS', "ctrl": True}), | ||||
| op_menu("TOPBAR_MT_file_open_recent", {"type": 'O', "value": 'PRESS', "shift": True, "ctrl": True}), | op_menu("TOPBAR_MT_file_open_recent", {"type": 'O', "value": 'PRESS', "shift": True, "ctrl": True}), | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | if not params.legacy: | ||||
| ]) | ]) | ||||
| if params.spacebar_action == 'TOOL': | if params.spacebar_action == 'TOOL': | ||||
| items.append( | items.append( | ||||
| ("wm.toolbar", {"type": 'SPACE', "value": 'PRESS'}, None), | ("wm.toolbar", {"type": 'SPACE', "value": 'PRESS'}, None), | ||||
| ) | ) | ||||
| elif params.spacebar_action == 'PLAY': | elif params.spacebar_action == 'PLAY': | ||||
| items.append( | items.append( | ||||
| ("wm.toolbar", {"type": 'SPACE', "value": 'PRESS', "shift": True}, None), | ("wm.toolbar", {"type": 'SPACE', "value": 'PRESS', "shift": True, "repeat": False}, None), | ||||
| ) | ) | ||||
| elif params.spacebar_action == 'SEARCH': | elif params.spacebar_action == 'SEARCH': | ||||
| items.append( | items.append( | ||||
| ("wm.search_menu", {"type": 'SPACE', "value": 'PRESS'}, None), | ("wm.search_menu", {"type": 'SPACE', "value": 'PRESS', "repeat": False}, None), | ||||
| ) | ) | ||||
| else: | else: | ||||
| assert False | assert False | ||||
| return keymap | return keymap | ||||
| def km_screen(params): | def km_screen(params): | ||||
| Show All 35 Lines | items.extend([ | ||||
| {"properties": [("animation", True), ("use_viewport", True)]}), | {"properties": [("animation", True), ("use_viewport", True)]}), | ||||
| ("render.view_cancel", {"type": 'ESC', "value": 'PRESS'}, None), | ("render.view_cancel", {"type": 'ESC', "value": 'PRESS'}, None), | ||||
| ("render.view_show", {"type": 'F11', "value": 'PRESS'}, None), | ("render.view_show", {"type": 'F11', "value": 'PRESS'}, None), | ||||
| ("render.play_rendered_anim", {"type": 'F11', "value": 'PRESS', "ctrl": True}, None), | ("render.play_rendered_anim", {"type": 'F11', "value": 'PRESS', "ctrl": True}, None), | ||||
| ]) | ]) | ||||
| if not params.legacy: | if not params.legacy: | ||||
| items.extend([ | items.extend([ | ||||
| ("screen.screen_full_area", {"type": 'SPACE', "value": 'PRESS', "ctrl": True}, None), | ("screen.screen_full_area", {"type": 'SPACE', "value": 'PRESS', "ctrl": True, "repeat": False}, None), | ||||
| ("screen.screen_full_area", {"type": 'SPACE', "value": 'PRESS', "ctrl": True, "alt": True}, | ("screen.screen_full_area", {"type": 'SPACE', "value": 'PRESS', "ctrl": True, "alt": True, "repeat": False}, | ||||
| {"properties": [("use_hide_panels", True)]}), | {"properties": [("use_hide_panels", True)]}), | ||||
| ("screen.redo_last", {"type": 'F9', "value": 'PRESS'}, None), | ("screen.redo_last", {"type": 'F9', "value": 'PRESS'}, None), | ||||
| ]) | ]) | ||||
| else: | else: | ||||
| # Old keymap | # Old keymap | ||||
| items.extend([ | items.extend([ | ||||
| ("ed.undo_history", {"type": 'Z', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ("ed.undo_history", {"type": 'Z', "value": 'PRESS', "ctrl": True, "alt": True}, None), | ||||
| ("screen.screen_full_area", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True}, None), | ("screen.screen_full_area", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True}, None), | ||||
| ▲ Show 20 Lines • Show All 723 Lines • ▼ Show 20 Lines | else: | ||||
| ("view3d.view_orbit", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True, "alt": True}, | ("view3d.view_orbit", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True, "alt": True}, | ||||
| {"properties": [("type", 'ORBITUP')]}), | {"properties": [("type", 'ORBITUP')]}), | ||||
| ("view3d.view_orbit", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True, "alt": True}, | ("view3d.view_orbit", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True, "alt": True}, | ||||
| {"properties": [("type", 'ORBITDOWN')]}), | {"properties": [("type", 'ORBITDOWN')]}), | ||||
| ("view3d.view_roll", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, | ("view3d.view_roll", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, | ||||
| {"properties": [("type", 'LEFT')]}), | {"properties": [("type", 'LEFT')]}), | ||||
| ("view3d.view_roll", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, | ("view3d.view_roll", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, | ||||
| {"properties": [("type", 'RIGHT')]}), | {"properties": [("type", 'RIGHT')]}), | ||||
| ("transform.create_orientation", {"type": 'SPACE', "value": 'PRESS', "ctrl": True, "alt": True}, | ("transform.create_orientation", {"type": 'SPACE', "value": 'PRESS', "ctrl": True, "alt": True, "repeat": False}, | ||||
| {"properties": [("use", True)]}), | {"properties": [("use", True)]}), | ||||
| ("transform.translate", {"type": 'T', "value": 'PRESS', "shift": True, "repeat": False}, | ("transform.translate", {"type": 'T', "value": 'PRESS', "shift": True, "repeat": False}, | ||||
| {"properties": [("texture_space", True)]}), | {"properties": [("texture_space", True)]}), | ||||
| ("transform.resize", {"type": 'T', "value": 'PRESS', "shift": True, "alt": True, "repeat": False}, | ("transform.resize", {"type": 'T', "value": 'PRESS', "shift": True, "alt": True, "repeat": False}, | ||||
| {"properties": [("texture_space", True)]}), | {"properties": [("texture_space", True)]}), | ||||
| # Old pivot. | # Old pivot. | ||||
| ("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS'}, | ("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS'}, | ||||
| {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'BOUNDING_BOX_CENTER')]}), | {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'BOUNDING_BOX_CENTER')]}), | ||||
| ("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS', "ctrl": True}, | ("wm.context_set_enum", {"type": 'COMMA', "value": 'PRESS', "ctrl": True}, | ||||
| {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'MEDIAN_POINT')]}), | {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'MEDIAN_POINT')]}), | ||||
| ("wm.context_toggle", {"type": 'COMMA', "value": 'PRESS', "alt": True}, | ("wm.context_toggle", {"type": 'COMMA', "value": 'PRESS', "alt": True}, | ||||
| {"properties": [("data_path", 'tool_settings.use_transform_pivot_point_align')]}), | {"properties": [("data_path", 'tool_settings.use_transform_pivot_point_align')]}), | ||||
| ("wm.context_toggle", {"type": 'SPACE', "value": 'PRESS', "ctrl": True}, | ("wm.context_toggle", {"type": 'SPACE', "value": 'PRESS', "ctrl": True, "repeat": False}, | ||||
| {"properties": [("data_path", 'space_data.show_gizmo_context')]}), | {"properties": [("data_path", 'space_data.show_gizmo_context')]}), | ||||
| ("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS'}, | ("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS'}, | ||||
| {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'CURSOR')]}), | {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'CURSOR')]}), | ||||
| ("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True}, | ("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True}, | ||||
| {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'INDIVIDUAL_ORIGINS')]}), | {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'INDIVIDUAL_ORIGINS')]}), | ||||
| ("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "alt": True}, | ("wm.context_set_enum", {"type": 'PERIOD', "value": 'PRESS', "alt": True}, | ||||
| {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'ACTIVE_ELEMENT')]}), | {"properties": [("data_path", 'tool_settings.transform_pivot_point'), ("value", 'ACTIVE_ELEMENT')]}), | ||||
| # Old shading. | # Old shading. | ||||
| ▲ Show 20 Lines • Show All 1,643 Lines • ▼ Show 20 Lines | items.extend([ | ||||
| ("screen.frame_offset", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "alt": True}, | ("screen.frame_offset", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "alt": True}, | ||||
| {"properties": [("delta", -1)]}), | {"properties": [("delta", -1)]}), | ||||
| ]) | ]) | ||||
| if not params.legacy: | if not params.legacy: | ||||
| # New playback | # New playback | ||||
| if params.spacebar_action in {'TOOL', 'SEARCH'}: | if params.spacebar_action in {'TOOL', 'SEARCH'}: | ||||
| items.append( | items.append( | ||||
| ("screen.animation_play", {"type": 'SPACE', "value": 'PRESS', "shift": True}, None), | ("screen.animation_play", {"type": 'SPACE', "value": 'PRESS', "shift": True, "repeat": False}, None), | ||||
| ) | ) | ||||
| elif params.spacebar_action == 'PLAY': | elif params.spacebar_action == 'PLAY': | ||||
campbellbarton: repeat will need to be set to false for all uses of the space-bar.
Check the 2.7x keymap too. | |||||
| items.append( | items.append( | ||||
| ("screen.animation_play", {"type": 'SPACE', "value": 'PRESS'}, None), | ("screen.animation_play", {"type": 'SPACE', "value": 'PRESS', "repeat": False}, None), | ||||
| ) | ) | ||||
| else: | else: | ||||
| assert False | assert False | ||||
| items.extend([ | items.extend([ | ||||
| ("screen.animation_play", {"type": 'SPACE', "value": 'PRESS', "shift": True, "ctrl": True}, | ("screen.animation_play", {"type": 'SPACE', "value": 'PRESS', "shift": True, "ctrl": True, "repeat": False}, | ||||
| {"properties": [("reverse", True)]}), | {"properties": [("reverse", True)]}), | ||||
| ]) | ]) | ||||
| else: | else: | ||||
| # Old playback | # Old playback | ||||
| items.extend([ | items.extend([ | ||||
| ("screen.frame_offset", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True}, | ("screen.frame_offset", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True}, | ||||
| {"properties": [("delta", 10)]}), | {"properties": [("delta", 10)]}), | ||||
| ("screen.frame_offset", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True}, | ("screen.frame_offset", {"type": 'DOWN_ARROW', "value": 'PRESS', "shift": True}, | ||||
| ▲ Show 20 Lines • Show All 2,127 Lines • ▼ Show 20 Lines | items.extend([ | ||||
| ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}, None), | ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}, None), | ||||
| ("SELECT", {"type": 'RIGHTMOUSE', "value": 'RELEASE', "any": True}, None), | ("SELECT", {"type": 'RIGHTMOUSE', "value": 'RELEASE', "any": True}, None), | ||||
| ("BEGIN", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, None), | ("BEGIN", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, None), | ||||
| ("DESELECT", {"type": 'LEFTMOUSE', "value": 'RELEASE', "shift": True}, None), | ("DESELECT", {"type": 'LEFTMOUSE', "value": 'RELEASE', "shift": True}, None), | ||||
| ("BEGIN", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None), | ("BEGIN", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None), | ||||
| ("SELECT", {"type": 'LEFTMOUSE', "value": 'RELEASE', "any": True}, None), | ("SELECT", {"type": 'LEFTMOUSE', "value": 'RELEASE', "any": True}, None), | ||||
| ("BEGIN", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None), | ("BEGIN", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None), | ||||
| ("DESELECT", {"type": 'MIDDLEMOUSE', "value": 'RELEASE'}, None), | ("DESELECT", {"type": 'MIDDLEMOUSE', "value": 'RELEASE'}, None), | ||||
| ("MOVE", {"type": 'SPACE', "value": 'ANY', "repeat": False, "any": True}, None), | |||||
| ]) | ]) | ||||
| return keymap | return keymap | ||||
| def km_gesture_zoom_border(_params): | def km_gesture_zoom_border(_params): | ||||
| items = [] | items = [] | ||||
| keymap = ( | keymap = ( | ||||
| Show All 22 Lines | keymap = ( | ||||
| {"items": items}, | {"items": items}, | ||||
| ) | ) | ||||
| items.extend([ | items.extend([ | ||||
| ("CANCEL", {"type": 'ESC', "value": 'PRESS', "any": True}, None), | ("CANCEL", {"type": 'ESC', "value": 'PRESS', "any": True}, None), | ||||
| ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'ANY', "any": True}, None), | ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'ANY', "any": True}, None), | ||||
| ("BEGIN", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None), | ("BEGIN", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None), | ||||
| ("SELECT", {"type": 'LEFTMOUSE', "value": 'RELEASE', "any": True}, None), | ("SELECT", {"type": 'LEFTMOUSE', "value": 'RELEASE', "any": True}, None), | ||||
| ("MOVE", {"type": 'SPACE', "value": 'ANY', "repeat": False, "any": True}, None), | |||||
| ]) | |||||
| return keymap | |||||
| def km_gesture_lasso(_params): | |||||
| items = [] | |||||
| keymap = ( | |||||
| "Gesture Lasso", | |||||
| {"space_type": 'EMPTY', "region_type": 'WINDOW', "modal": True}, | |||||
| {"items": items}, | |||||
| ) | |||||
| items.extend([ | |||||
| ("MOVE", {"type": 'SPACE', "value": 'ANY', "repeat": False, "any": True}, None), | |||||
| ]) | ]) | ||||
| return keymap | return keymap | ||||
| def km_standard_modal_map(_params): | def km_standard_modal_map(_params): | ||||
| items = [] | items = [] | ||||
| keymap = ( | keymap = ( | ||||
| ▲ Show 20 Lines • Show All 1,769 Lines • ▼ Show 20 Lines | return [ | ||||
| km_eyedropper_modal_map(params), | km_eyedropper_modal_map(params), | ||||
| km_eyedropper_colorramp_pointsampling_map(params), | km_eyedropper_colorramp_pointsampling_map(params), | ||||
| km_transform_modal_map(params), | km_transform_modal_map(params), | ||||
| km_view3d_interactive_add_tool_modal_map(params), | km_view3d_interactive_add_tool_modal_map(params), | ||||
| km_view3d_gesture_circle(params), | km_view3d_gesture_circle(params), | ||||
| km_gesture_border(params), | km_gesture_border(params), | ||||
| km_gesture_zoom_border(params), | km_gesture_zoom_border(params), | ||||
| km_gesture_straight_line(params), | km_gesture_straight_line(params), | ||||
| km_gesture_lasso(params), | |||||
| km_standard_modal_map(params), | km_standard_modal_map(params), | ||||
| km_knife_tool_modal_map(params), | km_knife_tool_modal_map(params), | ||||
| km_custom_normals_modal_map(params), | km_custom_normals_modal_map(params), | ||||
| km_bevel_modal_map(params), | km_bevel_modal_map(params), | ||||
| km_view3d_fly_modal(params), | km_view3d_fly_modal(params), | ||||
| km_view3d_walk_modal(params), | km_view3d_walk_modal(params), | ||||
| km_view3d_rotate_modal(params), | km_view3d_rotate_modal(params), | ||||
| km_view3d_move_modal(params), | km_view3d_move_modal(params), | ||||
| ▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines | |||||
repeat will need to be set to false for all uses of the space-bar.
Check the 2.7x keymap too.