Industry Compat Keymap: Use F-keys for viewpoints

Following user suggestion

  - Similar to some apps
  - Works better on laptops and desktops without numpads
  - Also fix some small inconsistencies with select more/less in Dopesheet
This commit is contained in:
William Reynish 2019-04-16 11:01:23 +02:00
parent 0d686ccc52
commit c9b8db74dc

@ -184,9 +184,7 @@ def km_window(params):
items.extend([
("wm.doc_view_manual_ui_context", {"type": 'F1', "value": 'PRESS'}, None),
op_panel("TOPBAR_PT_name", {"type": 'RET', "value": 'PRESS'}, [("keep_open", False)]),
op_panel("TOPBAR_PT_name", {"type": 'F2', "value": 'PRESS'}, [("keep_open", False)]),
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
# File operations
@ -199,7 +197,6 @@ def km_window(params):
# Quick menu and toolbar
op_menu("SCREEN_MT_user_menu", {"type": 'TAB', "value": 'PRESS', "shift": True}),
op_menu("SCREEN_MT_user_menu", {"type": 'F3', "value": 'PRESS'}),
# NDOF settings
op_menu("USERPREF_MT_ndof_settings", {"type": 'NDOF_BUTTON_MENU', "value": 'PRESS'}),
@ -629,10 +626,6 @@ def km_view3d(params):
{"properties": [("delta", 1)]}),
("view3d.zoom", {"type": 'NUMPAD_MINUS', "value": 'PRESS'},
{"properties": [("delta", -1)]}),
("view3d.zoom", {"type": 'EQUAL', "value": 'PRESS', "ctrl": True},
{"properties": [("delta", 1)]}),
("view3d.zoom", {"type": 'MINUS', "value": 'PRESS', "ctrl": True},
{"properties": [("delta", -1)]}),
("view3d.zoom", {"type": 'WHEELINMOUSE', "value": 'PRESS'},
{"properties": [("delta", 1)]}),
("view3d.zoom", {"type": 'WHEELOUTMOUSE', "value": 'PRESS'},
@ -641,64 +634,26 @@ def km_view3d(params):
{"properties": [("delta", 1)]}),
("view3d.dolly", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "shift": True},
{"properties": [("delta", -1)]}),
("view3d.dolly", {"type": 'EQUAL', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("delta", 1)]}),
("view3d.dolly", {"type": 'MINUS', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("delta", -1)]}),
("view3d.view_all", {"type": 'A', "value": 'PRESS'},
{"properties": [("center", False)]}),
("view3d.view_all", {"type": 'A', "value": 'PRESS', "shift": True},
{"properties": [("use_all_regions", True), ("center", False)]}),
# Numpad views.
("view3d.view_camera", {"type": 'NUMPAD_0', "value": 'PRESS'}, None),
("view3d.view_axis", {"type": 'NUMPAD_1', "value": 'PRESS'},
("view3d.view_camera", {"type": 'F4', "value": 'PRESS'}, None),
("view3d.view_axis", {"type": 'F1', "value": 'PRESS'},
{"properties": [("type", 'FRONT')]}),
("view3d.view_orbit", {"type": 'NUMPAD_2', "value": 'PRESS'},
{"properties": [("type", 'ORBITDOWN')]}),
("view3d.view_axis", {"type": 'NUMPAD_3', "value": 'PRESS'},
("view3d.view_axis", {"type": 'F2', "value": 'PRESS'},
{"properties": [("type", 'RIGHT')]}),
("view3d.view_orbit", {"type": 'NUMPAD_4', "value": 'PRESS'},
{"properties": [("type", 'ORBITLEFT')]}),
("view3d.view_persportho", {"type": 'NUMPAD_5', "value": 'PRESS'}, None),
("view3d.view_orbit", {"type": 'NUMPAD_6', "value": 'PRESS'},
{"properties": [("type", 'ORBITRIGHT')]}),
("view3d.view_axis", {"type": 'NUMPAD_7', "value": 'PRESS'},
("view3d.view_axis", {"type": 'F3', "value": 'PRESS'},
{"properties": [("type", 'TOP')]}),
("view3d.view_orbit", {"type": 'NUMPAD_8', "value": 'PRESS'},
{"properties": [("type", 'ORBITUP')]}),
("view3d.view_axis", {"type": 'NUMPAD_1', "value": 'PRESS', "ctrl": True},
("view3d.view_axis", {"type": 'F1', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'BACK')]}),
("view3d.view_axis", {"type": 'NUMPAD_3', "value": 'PRESS', "ctrl": True},
("view3d.view_axis", {"type": 'F2', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'LEFT')]}),
("view3d.view_axis", {"type": 'NUMPAD_7', "value": 'PRESS', "ctrl": True},
("view3d.view_axis", {"type": 'F3', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'BOTTOM')]}),
("view3d.view_pan", {"type": 'NUMPAD_2', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'PANDOWN')]}),
("view3d.view_pan", {"type": 'NUMPAD_4', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'PANLEFT')]}),
("view3d.view_pan", {"type": 'NUMPAD_6', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'PANRIGHT')]}),
("view3d.view_pan", {"type": 'NUMPAD_8', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'PANUP')]}),
("view3d.view_roll", {"type": 'NUMPAD_4', "value": 'PRESS', "shift": True},
{"properties": [("type", 'LEFT')]}),
("view3d.view_roll", {"type": 'NUMPAD_6', "value": 'PRESS', "shift": True},
{"properties": [("type", 'RIGHT')]}),
("view3d.view_orbit", {"type": 'NUMPAD_9', "value": 'PRESS'},
("view3d.view_orbit", {"type": 'F5', "value": 'PRESS'},
{"properties": [("angle", 3.1415927), ("type", 'ORBITRIGHT')]}),
("view3d.view_axis", {"type": 'NUMPAD_1', "value": 'PRESS', "shift": True},
{"properties": [("type", 'FRONT'), ("align_active", True)]}),
("view3d.view_axis", {"type": 'NUMPAD_3', "value": 'PRESS', "shift": True},
{"properties": [("type", 'RIGHT'), ("align_active", True)]}),
("view3d.view_axis", {"type": 'NUMPAD_7', "value": 'PRESS', "shift": True},
{"properties": [("type", 'TOP'), ("align_active", True)]}),
("view3d.view_axis", {"type": 'NUMPAD_1', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("type", 'BACK'), ("align_active", True)]}),
("view3d.view_axis", {"type": 'NUMPAD_3', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("type", 'LEFT'), ("align_active", True)]}),
("view3d.view_axis", {"type": 'NUMPAD_7', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("type", 'BOTTOM'), ("align_active", True)]}),
("view3d.view_center_pick", {"type": 'MIDDLEMOUSE', "value": 'CLICK', "alt": True}, None),
# NDOF
("view3d.ndof_orbit_zoom", {"type": 'NDOF_MOTION', "value": 'ANY'}, None),
("view3d.ndof_orbit", {"type": 'NDOF_MOTION', "value": 'ANY', "ctrl": True}, None),
@ -793,8 +748,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": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True}, None),
("mask.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True}, None),
("mask.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None),
("mask.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, 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)]}),
@ -936,7 +891,7 @@ def km_graph_editor(params):
("graph.view_all", {"type": 'A', "value": 'PRESS'}, None),
("graph.view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
("graph.view_selected", {"type": 'F', "value": 'PRESS'}, None),
("graph.view_frame", {"type": 'NUMPAD_0', "value": 'PRESS'}, None),
("graph.view_frame", {"type": 'A', "value": 'PRESS', "shift": True}, None),
("anim.channels_editable_toggle", {"type": 'TAB', "value": 'PRESS'}, None),
("transform.translate", {"type": 'W', "value": 'PRESS'}, None),
("transform.translate", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, None),
@ -995,25 +950,25 @@ def km_image(params):
("image.view_zoom", {"type": 'TRACKPADZOOM', "value": 'ANY'}, None),
("image.view_zoom", {"type": 'TRACKPADPAN', "value": 'ANY', "ctrl": True}, None),
("image.view_zoom_border", {"type": 'Z', "value": 'PRESS'}, None),
("image.view_zoom_ratio", {"type": 'NUMPAD_8', "value": 'PRESS', "ctrl": True},
("image.view_zoom_ratio", {"type": 'F4', "value": 'PRESS', "ctrl": True},
{"properties": [("ratio", 8.0)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_4', "value": 'PRESS', "ctrl": True},
("image.view_zoom_ratio", {"type": 'F3', "value": 'PRESS', "ctrl": True},
{"properties": [("ratio", 4.0)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_2', "value": 'PRESS', "ctrl": True},
("image.view_zoom_ratio", {"type": 'F2', "value": 'PRESS', "ctrl": True},
{"properties": [("ratio", 2.0)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_8', "value": 'PRESS', "shift": True},
("image.view_zoom_ratio", {"type": 'F4', "value": 'PRESS', "shift": True},
{"properties": [("ratio", 8.0)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_4', "value": 'PRESS', "shift": True},
("image.view_zoom_ratio", {"type": 'F3', "value": 'PRESS', "shift": True},
{"properties": [("ratio", 4.0)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_2', "value": 'PRESS', "shift": True},
("image.view_zoom_ratio", {"type": 'F2', "value": 'PRESS', "shift": True},
{"properties": [("ratio", 2.0)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_1', "value": 'PRESS'},
("image.view_zoom_ratio", {"type": 'F1', "value": 'PRESS'},
{"properties": [("ratio", 1.0)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_2', "value": 'PRESS'},
("image.view_zoom_ratio", {"type": 'F2', "value": 'PRESS'},
{"properties": [("ratio", 0.5)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_4', "value": 'PRESS'},
("image.view_zoom_ratio", {"type": 'F3', "value": 'PRESS'},
{"properties": [("ratio", 0.25)]}),
("image.view_zoom_ratio", {"type": 'NUMPAD_8', "value": 'PRESS'},
("image.view_zoom_ratio", {"type": 'F4', "value": 'PRESS'},
{"properties": [("ratio", 0.125)]}),
("image.change_frame", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
("image.sample", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
@ -1375,9 +1330,9 @@ 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": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True}, None),
("action.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True}, None),
("action.select_linked", {"type": 'L', "value": 'PRESS'}, None),
("action.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True}, None),
("action.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "ctrl": True}, None),
("action.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
("action.frame_jump", {"type": 'G', "value": 'PRESS', "ctrl": True}, None),
op_menu("DOPESHEET_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
op_menu("DOPESHEET_MT_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}),