Keymaps: replace select / action mouse system
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 15 Nov 2018 21:28:58 +0000 (08:28 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 Nov 2018 21:31:00 +0000 (08:31 +1100)
For Blender builtin configurations the option to choose the select mouse remains
and is now also in the splash screen. It works by changing the keymap dynamically
in the script, rather than using special events.

The system of automatic switching of events was not flexible enough to deal with
side effects that require further keymap changes, so it is now under more manual
control in the script.

This breaks compatibility for some scripts and exported key configurations.
These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and
EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and
EVT_TWEAK_R events.

Other than that, there should be no functional changes.

20 files changed:
release/scripts/modules/bpy_extras/keyconfig_utils.py
release/scripts/presets/keyconfig/3dsmax.py
release/scripts/presets/keyconfig/blender.py
release/scripts/presets/keyconfig/blender_27x.py
release/scripts/presets/keyconfig/keymap_data/blender_default.py
release/scripts/presets/keyconfig/maya.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/space_toolsystem_common.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/templates_py/ui_tool_simple.py
source/blender/blenkernel/BKE_blender_version.h
source/blender/blenloader/CMakeLists.txt
source/blender/blenloader/intern/versioning_userdef.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/space_graph/graph_ops.c
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/makesrna/intern/rna_wm.c
source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/wm_event_types.h

index 51f1980f5196b06bc46a4bfcea18e85e4dd271ce..6de0cc2e2055b2fecc0cc24e7533a46529d43874 100644 (file)
@@ -500,6 +500,8 @@ def keyconfig_import_from_data(name, keyconfig_data):
         km = kc.keymaps.new(km_name, **km_args)
         keymap_items_from_data(km, km_content["items"], is_modal=km_args.get("modal", False))
 
+    return kc
+
 
 def keyconfig_module_from_preset(name, preset_reference_filename=None):
     import os
index 206dc820f0490d5de20863853f71d1494a0cd06d..2e94676c489cf00369e61b4dac5658a250d2d01d 100644 (file)
@@ -112,16 +112,16 @@ kmi = km.keymap_items.new('screen.userpref_show', 'U', 'PRESS', ctrl=True, alt=T
 km = kc.keymaps.new('Markers', space_type='EMPTY', region_type='WINDOW', modal=False)
 
 kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
-kmi = km.keymap_items.new('marker.move', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('marker.move', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('marker.duplicate', 'D', 'PRESS', shift=True)
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.extend = False
 kmi.properties.camera = True
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.extend = True
 kmi.properties.camera = True
 kmi = km.keymap_items.new('marker.select_box', 'B', 'PRESS')
@@ -203,9 +203,9 @@ kmi.properties.action = 'SELECT'
 kmi = km.keymap_items.new('paint.vert_select_all', 'I', 'PRESS', ctrl=True)
 kmi.properties.action = 'INVERT'
 kmi = km.keymap_items.new('view3d.select_box', 'B', 'PRESS')
-kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
+kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_R', 'ANY', ctrl=True)
 kmi.properties.deselect = False
-kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
+kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_R', 'ANY', shift=True, ctrl=True)
 kmi.properties.deselect = True
 kmi = km.keymap_items.new('view3d.select_circle', 'C', 'PRESS', alt=True)
 
@@ -430,7 +430,7 @@ kmi.properties.release_confirm = True
 kmi.properties.use_accurate= True
 kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
 kmi.properties.release_confirm = True
-kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
+kmi = km.keymap_items.new('view3d.cursor3d', 'RIGHTMOUSE', 'PRESS')
 kmi = km.keymap_items.new('view3d.rotate', 'MIDDLEMOUSE', 'PRESS', alt=True)
 kmi = km.keymap_items.new('view3d.move', 'MIDDLEMOUSE', 'PRESS')
 kmi = km.keymap_items.new('view3d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
@@ -592,56 +592,56 @@ kmi = km.keymap_items.new('wm.context_toggle_enum', 'Z', 'PRESS', alt=True)
 kmi.properties.data_path = 'space_data.shading.type'
 kmi.properties.value_1 = 'SOLID'
 kmi.properties.value_2 = 'TEXTURED'
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK')
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK')
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
 kmi.properties.center = False
 kmi.properties.enumerate = False
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', ctrl=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', ctrl=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = True
 kmi.properties.center = False
 kmi.properties.enumerate = False
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
 kmi.properties.center = True
 kmi.properties.enumerate = False
 kmi.properties.object = True
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
 kmi.properties.center = False
 kmi.properties.enumerate = True
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, ctrl=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True, ctrl=True)
 kmi.properties.extend = True
 kmi.properties.deselect = False
 kmi.properties.toggle = True
 kmi.properties.center = True
 kmi.properties.enumerate = False
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', ctrl=True, alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
 kmi.properties.center = True
 kmi.properties.enumerate = True
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = True
 kmi.properties.center = False
 kmi.properties.enumerate = True
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = True
@@ -650,9 +650,9 @@ kmi.properties.enumerate = True
 kmi.properties.object = False
 kmi = km.keymap_items.new('view3d.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
+kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_R', 'ANY', ctrl=True)
 kmi.properties.deselect = False
-kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
+kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_R', 'ANY', shift=True, ctrl=True)
 kmi.properties.deselect = True
 kmi = km.keymap_items.new('view3d.select_circle', 'C', 'PRESS', alt=True)
 # kmi = km.keymap_items.new('view3d.clip_border', 'B', 'PRESS', alt=True)
@@ -688,7 +688,7 @@ kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'PRESS', alt=True)
 kmi.properties.data_path = 'space_data.pivot_point'
 kmi.properties.value = 'ACTIVE_ELEMENT'
 kmi = km.keymap_items.new('transform.translate', 'W', 'PRESS', shift=True)
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.rotate', 'E', 'PRESS', shift=True)
 kmi = km.keymap_items.new('transform.resize', 'R', 'PRESS', shift=True)
 kmi = km.keymap_items.new('transform.bend', 'Q', 'PRESS', shift=True)
@@ -767,13 +767,13 @@ km = kc.keymaps.new('UV Editor', space_type='EMPTY', region_type='WINDOW', modal
 kmi = km.keymap_items.new('wm.context_toggle', 'Q', 'PRESS')
 kmi.properties.data_path = 'tool_settings.use_uv_sculpt'
 kmi = km.keymap_items.new('uv.mark_seam', 'E', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('uv.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('uv.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('uv.select_loop', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('uv.select_loop', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
-kmi = km.keymap_items.new('uv.select_loop', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('uv.select_loop', 'LEFTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
 kmi = km.keymap_items.new('uv.select_split', 'Y', 'PRESS')
 kmi = km.keymap_items.new('uv.select_box', 'B', 'PRESS')
@@ -781,9 +781,9 @@ kmi.properties.pinned = False
 kmi = km.keymap_items.new('uv.select_box', 'B', 'PRESS', shift=True)
 kmi.properties.pinned = True
 kmi = km.keymap_items.new('uv.circle_select', 'C', 'PRESS')
-kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
+kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_R', 'ANY', ctrl=True)
 kmi.properties.deselect = False
-kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
+kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_R', 'ANY', shift=True, ctrl=True)
 kmi.properties.deselect = True
 kmi = km.keymap_items.new('uv.select_linked', 'L', 'PRESS', ctrl=True)
 kmi.properties.extend = False
@@ -814,8 +814,8 @@ kmi.properties.unselected = False
 kmi = km.keymap_items.new('uv.hide', 'H', 'PRESS', shift=True)
 kmi.properties.unselected = True
 kmi = km.keymap_items.new('uv.reveal', 'H', 'PRESS', alt=True)
-kmi = km.keymap_items.new('uv.cursor_set', 'ACTIONMOUSE', 'PRESS')
-kmi = km.keymap_items.new('uv.tile_set', 'ACTIONMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('uv.cursor_set', 'RIGHTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('uv.tile_set', 'RIGHTMOUSE', 'PRESS', shift=True)
 kmi = km.keymap_items.new('wm.call_menu', 'S', 'PRESS', shift=True)
 kmi.properties.name = 'IMAGE_MT_uvs_snap'
 kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)
@@ -827,7 +827,7 @@ kmi.properties.data_path = 'tool_settings.proportional_edit'
 kmi.properties.value_1 = 'DISABLED'
 kmi.properties.value_2 = 'ENABLED'
 kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')
 kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')
 kmi = km.keymap_items.new('transform.shear', 'S', 'PRESS', shift=True, ctrl=True, alt=True)
@@ -845,15 +845,15 @@ kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
 kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'
 kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS')
 kmi.properties.data_path = 'tool_settings.use_proportional_edit_mask'
-kmi = km.keymap_items.new('mask.add_vertex_slide', 'ACTIONMOUSE', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('mask.add_feather_vertex_slide', 'ACTIONMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('mask.add_vertex_slide', 'RIGHTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('mask.add_feather_vertex_slide', 'RIGHTMOUSE', 'PRESS', shift=True)
 kmi = km.keymap_items.new('mask.delete', 'X', 'PRESS')
 kmi = km.keymap_items.new('mask.delete', 'DEL', 'PRESS')
-kmi = km.keymap_items.new('mask.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('mask.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
-kmi = km.keymap_items.new('mask.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('mask.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = True
@@ -868,28 +868,28 @@ kmi = km.keymap_items.new('mask.select_linked_pick', 'L', 'PRESS', shift=True)
 kmi.properties.deselect = True
 kmi = km.keymap_items.new('mask.select_box', 'B', 'PRESS')
 kmi = km.keymap_items.new('mask.select_circle', 'C', 'PRESS')
-kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)
+kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_R', 'ANY', ctrl=True, alt=True)
 kmi.properties.deselect = False
-kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_R', 'ANY', shift=True, ctrl=True, alt=True)
 kmi.properties.deselect = True
 kmi = km.keymap_items.new('mask.hide_view_clear', 'H', 'PRESS', alt=True)
 kmi = km.keymap_items.new('mask.hide_view_set', 'H', 'PRESS')
 kmi.properties.unselected = False
 kmi = km.keymap_items.new('mask.hide_view_set', 'H', 'PRESS', shift=True)
 kmi.properties.unselected = True
-kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('clip.select', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.extend = False
 kmi = km.keymap_items.new('mask.cyclic_toggle', 'C', 'PRESS', alt=True)
-kmi = km.keymap_items.new('mask.slide_point', 'ACTIONMOUSE', 'PRESS')
+kmi = km.keymap_items.new('mask.slide_point', 'RIGHTMOUSE', 'PRESS')
 kmi = km.keymap_items.new('mask.handle_type_set', 'V', 'PRESS')
 kmi = km.keymap_items.new('mask.normals_make_consistent', 'N', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('mask.parent_set', 'P', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('mask.parent_clear', 'P', 'PRESS', alt=True)
 kmi = km.keymap_items.new('mask.shape_key_insert', 'I', 'PRESS')
 kmi = km.keymap_items.new('mask.shape_key_clear', 'I', 'PRESS', alt=True)
-kmi = km.keymap_items.new('uv.cursor_set', 'ACTIONMOUSE', 'PRESS')
+kmi = km.keymap_items.new('uv.cursor_set', 'RIGHTMOUSE', 'PRESS')
 kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')
 kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')
 kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS', alt=True)
@@ -900,35 +900,35 @@ km = kc.keymaps.new('Graph Editor', space_type='GRAPH_EDITOR', region_type='WIND
 
 kmi = km.keymap_items.new('wm.context_toggle', 'H', 'PRESS', ctrl=True)
 kmi.properties.data_path = 'space_data.show_handles'
-kmi = km.keymap_items.new('graph.cursor_set', 'ACTIONMOUSE', 'PRESS')
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('graph.cursor_set', 'RIGHTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
 kmi.properties.column = False
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
 kmi.properties.column = True
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi.properties.column = False
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.column = True
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.column = False
 kmi.properties.curves = True
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.column = False
 kmi.properties.curves = True
-kmi = km.keymap_items.new('graph.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('graph.select_leftright', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = False
-kmi = km.keymap_items.new('graph.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('graph.select_leftright', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = True
 kmi = km.keymap_items.new('graph.select_leftright', 'LEFT_BRACKET', 'PRESS')
@@ -977,7 +977,7 @@ kmi = km.keymap_items.new('graph.delete', 'X', 'PRESS')
 kmi = km.keymap_items.new('graph.delete', 'DEL', 'PRESS')
 kmi = km.keymap_items.new('graph.duplicate_move', 'D', 'PRESS', shift=True)
 kmi = km.keymap_items.new('graph.keyframe_insert', 'I', 'PRESS')
-kmi = km.keymap_items.new('graph.click_insert', 'ACTIONMOUSE', 'CLICK', ctrl=True)
+kmi = km.keymap_items.new('graph.click_insert', 'RIGHTMOUSE', 'CLICK', ctrl=True)
 kmi = km.keymap_items.new('graph.copy', 'C', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('graph.paste', 'V', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('graph.previewrange_set', 'P', 'PRESS', ctrl=True, alt=True)
@@ -987,7 +987,7 @@ kmi = km.keymap_items.new('graph.fmodifier_add', 'M', 'PRESS', shift=True, ctrl=
 kmi.properties.only_active = False
 kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')
 kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')
 kmi.properties.mode = 'TIME_EXTEND'
 kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')
@@ -998,43 +998,43 @@ kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
 # Map Node Editor
 km = kc.keymaps.new('Node Editor', space_type='NODE_EDITOR', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS')
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', ctrl=True, alt=True)
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('node.select', 'RIGHTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('node.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.tweak = True
-kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)
+kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_R', 'ANY', ctrl=True, alt=True)
 kmi.properties.deselect = False
-kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_R', 'ANY', shift=True, ctrl=True, alt=True)
 kmi.properties.deselect = True
 kmi = km.keymap_items.new('node.link', 'LEFTMOUSE', 'PRESS')
 kmi.properties.detach = False
@@ -1049,7 +1049,7 @@ kmi = km.keymap_items.new('node.backimage_zoom', 'V', 'PRESS')
 kmi.properties.factor = 0.833329975605011
 kmi = km.keymap_items.new('node.backimage_zoom', 'V', 'PRESS', alt=True)
 kmi.properties.factor = 1.2000000476837158
-kmi = km.keymap_items.new('node.backimage_sample', 'ACTIONMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('node.backimage_sample', 'RIGHTMOUSE', 'PRESS', alt=True)
 kmi = km.keymap_items.new('node.link_make', 'F', 'PRESS')
 kmi.properties.replace = False
 kmi = km.keymap_items.new('node.link_make', 'F', 'PRESS', shift=True)
@@ -1111,19 +1111,19 @@ kmi = km.keymap_items.new('node.clipboard_copy', 'C', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('node.clipboard_paste', 'V', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('node.viewer_border', 'B', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('node.translate_attach', 'G', 'PRESS')
-kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_A', 'ANY')
-kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_R', 'ANY')
+kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')
 kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')
 kmi = km.keymap_items.new('node.move_detach_links', 'D', 'PRESS', alt=True)
-kmi = km.keymap_items.new('node.move_detach_links_release', 'EVT_TWEAK_A', 'ANY', alt=True)
-kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_S', 'ANY', alt=True)
+kmi = km.keymap_items.new('node.move_detach_links_release', 'EVT_TWEAK_R', 'ANY', alt=True)
+kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_L', 'ANY', alt=True)
 kmi = km.keymap_items.new('node.detach_translate_attach', 'F', 'PRESS', alt=True)
 
 # Map Info
 km = kc.keymaps.new('Info', space_type='INFO', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('info.select_pick', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('info.select_pick', 'LEFTMOUSE', 'PRESS')
 kmi = km.keymap_items.new('info.select_all_toggle', 'A', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('info.select_box', 'B', 'PRESS')
 kmi = km.keymap_items.new('info.report_replay', 'R', 'PRESS')
@@ -1173,22 +1173,22 @@ kmi.properties.increment = -100
 # Map Dopesheet
 km = kc.keymaps.new('Dopesheet', space_type='DOPESHEET_EDITOR', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('action.clickselect', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
 kmi.properties.column = False
-kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('action.clickselect', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
 kmi.properties.column = True
-kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('action.clickselect', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi.properties.column = False
-kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('action.clickselect', 'LEFTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.column = True
-kmi = km.keymap_items.new('action.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('action.select_leftright', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = False
-kmi = km.keymap_items.new('action.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('action.select_leftright', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = True
 kmi = km.keymap_items.new('action.select_leftright', 'LEFT_BRACKET', 'PRESS')
@@ -1237,7 +1237,7 @@ kmi = km.keymap_items.new('action.view_selected', 'NUMPAD_PERIOD', 'PRESS')
 kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')
 kmi = km.keymap_items.new('transform.transform', 'G', 'PRESS')
 kmi.properties.mode = 'TIME_TRANSLATE'
-kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.mode = 'TIME_TRANSLATE'
 kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')
 kmi.properties.mode = 'TIME_EXTEND'
@@ -1251,14 +1251,14 @@ kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
 # Map NLA Editor
 km = kc.keymaps.new('NLA Editor', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('nla.click_select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('nla.click_select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('nla.select_leftright', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = False
-kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('nla.select_leftright', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = True
 kmi = km.keymap_items.new('nla.select_leftright', 'LEFT_BRACKET', 'PRESS')
@@ -1298,7 +1298,7 @@ kmi = km.keymap_items.new('nla.snap', 'S', 'PRESS', shift=True)
 kmi = km.keymap_items.new('nla.fmodifier_add', 'M', 'PRESS', shift=True, ctrl=True)
 kmi = km.keymap_items.new('transform.transform', 'G', 'PRESS')
 kmi.properties.mode = 'TRANSLATION'
-kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.mode = 'TRANSLATION'
 kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')
 kmi.properties.mode = 'TIME_EXTEND'
@@ -1387,32 +1387,32 @@ kmi = km.keymap_items.new('sequencer.cut_multicam', 'NINE', 'PRESS')
 kmi.properties.camera = 9
 kmi = km.keymap_items.new('sequencer.cut_multicam', 'ZERO', 'PRESS')
 kmi.properties.camera = 10
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
 kmi.properties.linked_handle = True
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.linked_handle = True
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.extend = False
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'MOUSE'
 kmi.properties.linked_time = True
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.extend = True
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'NONE'
@@ -1434,7 +1434,7 @@ kmi = km.keymap_items.new('wm.context_set_int', 'O', 'PRESS')
 kmi.properties.data_path = 'scene.sequence_editor.overlay_frame'
 kmi.properties.value = 0
 kmi = km.keymap_items.new('transform.seq_slide', 'G', 'PRESS')
-kmi = km.keymap_items.new('transform.seq_slide', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.seq_slide', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')
 kmi.properties.mode = 'TIME_EXTEND'
 kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
@@ -1488,9 +1488,9 @@ kmi.properties.position = 'FAILEDPREV'
 kmi = km.keymap_items.new('clip.frame_jump', 'RIGHT_ARROW', 'PRESS', shift=True, alt=True)
 kmi.properties.position = 'PATHSTART'
 kmi = km.keymap_items.new('clip.change_frame', 'LEFTMOUSE', 'PRESS')
-kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('clip.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('clip.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi = km.keymap_items.new('clip.select_all', 'A', 'PRESS', ctrl=True)
 kmi.properties.action = 'TOGGLE'
@@ -1500,9 +1500,9 @@ kmi = km.keymap_items.new('clip.select_box', 'B', 'PRESS')
 kmi = km.keymap_items.new('clip.select_circle', 'C', 'PRESS')
 kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', shift=True)
 kmi.properties.name = 'CLIP_MT_select_grouped'
-kmi = km.keymap_items.new('clip.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)
+kmi = km.keymap_items.new('clip.select_lasso', 'EVT_TWEAK_R', 'ANY', ctrl=True, alt=True)
 kmi.properties.deselect = False
-kmi = km.keymap_items.new('clip.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('clip.select_lasso', 'EVT_TWEAK_R', 'ANY', shift=True, ctrl=True, alt=True)
 kmi.properties.deselect = True
 kmi = km.keymap_items.new('clip.add_marker_slide', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('clip.delete_marker', 'DEL', 'PRESS', shift=True)
@@ -1533,7 +1533,7 @@ kmi.properties.data_path = 'space_data.show_marker_search'
 kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')
 kmi.properties.data_path = 'space_data.use_mute_footage'
 kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')
 kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')
 kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', alt=True)
@@ -1549,10 +1549,10 @@ kmi.properties.clear_active = False
 # Map Clip Graph Editor
 km = kc.keymaps.new('Clip Graph Editor', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('clip.change_frame', 'ACTIONMOUSE', 'PRESS')
-kmi = km.keymap_items.new('clip.graph_select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('clip.change_frame', 'RIGHTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('clip.graph_select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('clip.graph_select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('clip.graph_select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi = km.keymap_items.new('clip.graph_select_all_markers', 'A', 'PRESS', ctrl=True)
 kmi.properties.action = 'TOGGLE'
@@ -1579,7 +1579,7 @@ kmi.properties.clear_active = True
 kmi = km.keymap_items.new('clip.graph_disable_markers', 'D', 'PRESS', shift=True)
 kmi.properties.action = 'TOGGLE'
 kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')
 kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')
 
@@ -1790,8 +1790,8 @@ kmi.properties.data_path = 'vertex_paint_object.data.use_paint_mask'
 km = kc.keymaps.new('Weight Paint', space_type='EMPTY', region_type='WINDOW', modal=False)
 
 kmi = km.keymap_items.new('paint.weight_paint', 'LEFTMOUSE', 'PRESS')
-kmi = km.keymap_items.new('paint.weight_sample', 'ACTIONMOUSE', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('paint.weight_sample_group', 'ACTIONMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('paint.weight_sample', 'RIGHTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('paint.weight_sample_group', 'RIGHTMOUSE', 'PRESS', shift=True)
 kmi = km.keymap_items.new('paint.weight_gradient', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.type = 'LINEAR'
 kmi = km.keymap_items.new('paint.weight_gradient', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)
@@ -2096,23 +2096,23 @@ kmi = km.keymap_items.new('mesh.bevel', 'B', 'PRESS', ctrl=True)
 kmi.properties.vertex_only = False
 kmi = km.keymap_items.new('mesh.bevel', 'B', 'PRESS', shift=True, ctrl=True)
 kmi.properties.vertex_only = True
-kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('mesh.loop_select', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
-kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('mesh.loop_select', 'LEFTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = True
-kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
+kmi = km.keymap_items.new('mesh.edgering_select', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
-kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('mesh.edgering_select', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = True
-kmi = km.keymap_items.new('mesh.shortest_path_pick', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('mesh.shortest_path_pick', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('mesh.select_all', 'I', 'PRESS', ctrl=True)
 kmi.properties.action = 'INVERT'
 kmi = km.keymap_items.new('mesh.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)
@@ -2162,9 +2162,9 @@ kmi = km.keymap_items.new('mesh.separate', 'P', 'PRESS')
 kmi = km.keymap_items.new('mesh.split', 'Y', 'PRESS')
 kmi = km.keymap_items.new('mesh.vert_connect', 'J', 'PRESS')
 kmi = km.keymap_items.new('transform.vert_slide', 'V', 'PRESS', shift=True)
-kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', ctrl=True)
+kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'RIGHTMOUSE', 'CLICK', ctrl=True)
 kmi.properties.rotate_source = True
-kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', shift=True, ctrl=True)
+kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'RIGHTMOUSE', 'CLICK', shift=True, ctrl=True)
 kmi.properties.rotate_source = False
 kmi = km.keymap_items.new('wm.call_menu', 'X', 'PRESS')
 kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete'
index 66db91d9186aebf9757f97f8d2fc7a99818aae30..477da63d78f45506d38bcdad75c66000c150468c 100644 (file)
@@ -1,12 +1,23 @@
-
 import os
+import bpy
+
+userpref = bpy.context.user_preferences
+
 from bpy_extras.keyconfig_utils import (
     keyconfig_import_from_data,
     keyconfig_module_from_preset,
 )
 
 _mod = keyconfig_module_from_preset(os.path.join("keymap_data", "blender_default"), __file__)
-keyconfig_data = _mod.generate_keymaps()
+keyconfig_data = _mod.generate_keymaps(
+    _mod.KeymapParams(
+        select_mouse=userpref.inputs.select_mouse,
+    ),
+)
 
 if __name__ == "__main__":
-    keyconfig_import_from_data("Blender", keyconfig_data)
+    kc = keyconfig_import_from_data(
+        os.path.splitext(os.path.basename(__file__))[0],
+        keyconfig_data,
+    )
+    kc.has_select_mouse = True  # Support switching select mouse
index 69d84639a867cd04ceafe12c4846c00737dd7552..6d7b95fd5d7ef29264c66e04dde81a6dd506795a 100644 (file)
@@ -1,11 +1,24 @@
 import os
+import bpy
+
+userpref = bpy.context.user_preferences
+
 from bpy_extras.keyconfig_utils import (
     keyconfig_import_from_data,
     keyconfig_module_from_preset,
 )
 
 _mod = keyconfig_module_from_preset(os.path.join("keymap_data", "blender_default"), __file__)
-keyconfig_data = _mod.generate_keymaps(_mod.KeymapParams(legacy=True))
+keyconfig_data = _mod.generate_keymaps(
+    _mod.KeymapParams(
+        legacy=True,
+        select_mouse=userpref.inputs.select_mouse,
+    ),
+)
 
 if __name__ == "__main__":
-    keyconfig_import_from_data("blender_27x", keyconfig_data)
+    kc = keyconfig_import_from_data(
+        os.splitext(os.path.basename(__file__))[0],
+        keyconfig_data,
+    )
+    kc.has_select_mouse = True  # Support switching select mouse
index 653387bd3035f0978d23494ed0bb791cdf9cc65b..53f1c159c01d0512f98c060c650b8f62f9eca11e 100644 (file)
@@ -35,25 +35,13 @@ class KeymapParams:
         "cursor_set_event",
     )
 
-    def __init__(self, legacy=False, select_mode='AUTO'):
+    def __init__(self, legacy=False, select_mode='AUTO', select_mouse='RIGHT'):
         import platform
+
         self.apple = platform.system() == 'Darwin'
         self.legacy = legacy
 
-        if select_mode == 'LEFT':
-            # Left mouse select uses Click event for selection. This is a little
-            # less immediate, but is needed to distinguish between click and tweak
-            # events on the same mouse buttons.
-            self.select_mouse = 'LEFTMOUSE'
-            self.select_tweak = 'EVT_TWEAK_L'
-            self.select_click = 'CLICK'
-            self.action_mouse = 'RIGHTMOUSE'
-            self.action_tweak = 'EVT_TWEAK_R'
-            self.tool_mouse = 'RIGHTMOUSE'
-            self.tool_tweak = 'EVT_TWEAK_R'
-            self.context_menu_event = {"type": 'RIGHTMOUSE', "value": 'PRESS'}
-            self.cursor_set_event = {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True}
-        elif select_mode == 'RIGHT':
+        if select_mouse == 'RIGHT':
             # Right mouse select.
             self.select_mouse = 'RIGHTMOUSE'
             self.select_tweak = 'EVT_TWEAK_R'
@@ -65,16 +53,29 @@ class KeymapParams:
             self.context_menu_event = {"type": 'W', "value": 'PRESS'}
             self.cursor_set_event = {"type": 'LEFTMOUSE', "value": 'PRESS'}
         else:
-            # Automatic switching using special events, to be removed.
-            self.select_mouse = 'SELECTMOUSE'
-            self.select_tweak = 'EVT_TWEAK_S'
-            self.select_click = 'PRESS'
-            self.action_mouse = 'ACTIONMOUSE'
-            self.action_tweak = 'EVT_TWEAK_A'
-            self.tool_mouse = 'ACTIONMOUSE'
-            self.tool_tweak = 'EVT_TWEAK_A'
-            self.context_menu_event = {"type": 'W', "value": 'PRESS'}
-            self.cursor_set_event = {"type": self.action_mouse, "value": 'PRESS'}
+            # Left mouse select uses Click event for selection. This is a little
+            # less immediate, but is needed to distinguish between click and tweak
+            # events on the same mouse buttons.
+            self.select_mouse = 'LEFTMOUSE'
+            self.select_tweak = 'EVT_TWEAK_L'
+            self.action_mouse = 'RIGHTMOUSE'
+            self.action_tweak = 'EVT_TWEAK_R'
+
+            if True:
+                # Temporary backwards compatible behavior.
+                self.select_click = 'PRESS'
+                self.tool_mouse = 'RIGHTMOUSE'
+                self.tool_tweak = 'EVT_TWEAK_R'
+                self.context_menu_event = {"type": 'W', "value": 'PRESS'}
+                self.cursor_set_event = {"type": 'RIGHTMOUSE', "value": 'PRESS'}
+            else:
+                # Planned keymap changes.
+                self.select_click = 'CLICK'
+                self.tool_mouse = 'LEFTMOUSE'
+                self.tool_tweak = 'EVT_TWEAK_L'
+                self.context_menu_event = {"type": 'RIGHTMOUSE', "value": 'PRESS'}
+                self.cursor_set_event = {"type": 'RIGHTMOUSE', "value": 'PRESS', "ctrl": True}
+
 
 # ------------------------------------------------------------------------------
 # Constants
index 1ce2fb34ccfe11d636d512fea2e104242fc6fce7..84e87ab48e77df302d7fa2970757429c0c676006 100644 (file)
@@ -180,23 +180,23 @@ kmi = km.keymap_items.new('view2d.reset', 'A', 'PRESS')
 km = kc.keymaps.new('Markers', space_type='EMPTY', region_type='WINDOW', modal=False)
 
 kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
-kmi = km.keymap_items.new('marker.move', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('marker.move', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('marker.duplicate', 'D', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
 kmi.properties.camera = False
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi.properties.camera = False
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.extend = False
 kmi.properties.camera = True
-kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('marker.select', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.extend = True
 kmi.properties.camera = True
-kmi = km.keymap_items.new('marker.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('marker.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('marker.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('marker.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('marker.select_all', 'A', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('marker.delete', 'BACK_SPACE', 'PRESS')
 kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
@@ -227,7 +227,7 @@ kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK')
 kmi.properties.extend = False
 kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('outliner.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('outliner.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS')
 kmi.properties.all = False
 kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS', shift=True)
@@ -604,12 +604,12 @@ kmi.properties.data_path = 'tool_settings.sculpt.brush.stroke_method'
 km = kc.keymaps.new('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)
 
 kmi = km.keymap_items.new('mesh.loopcut_slide', 'R', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
+kmi = km.keymap_items.new('mesh.loop_select', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.deselect = False
 kmi.properties.toggle = False
 kmi.properties.ring = False
-kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
+kmi = km.keymap_items.new('mesh.loop_select', 'LEFTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.deselect = False
 kmi.properties.toggle = False
@@ -915,7 +915,7 @@ kmi = km.keymap_items.new('object.origin_set', 'C', 'PRESS', shift=True, ctrl=Tr
 # Map 3D View
 km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
+kmi = km.keymap_items.new('view3d.cursor3d', 'RIGHTMOUSE', 'PRESS')
 kmi = km.keymap_items.new('view3d.rotate', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.release_confirm = True
@@ -993,65 +993,65 @@ kmi = km.keymap_items.new('wm.context_toggle_enum', 'FIVE', 'PRESS')
 kmi.properties.data_path = 'space_data.shading.type'
 kmi.properties.value_1 = 'TEXTURED'
 kmi.properties.value_2 = 'SOLID'
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK')
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK')
 kmi.properties.extend = False
 kmi.properties.toggle = False
 kmi.properties.deselect = False
 kmi.properties.center = False
 kmi.properties.object = False
 kmi.properties.enumerate = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True)
 kmi.properties.extend = False
 kmi.properties.toggle = True
 kmi.properties.deselect = False
 kmi.properties.center = False
 kmi.properties.object = False
 kmi.properties.enumerate = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', ctrl=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', ctrl=True)
 kmi.properties.center = False
 kmi.properties.extend = False
 kmi.properties.toggle = False
 kmi.properties.deselect = True
 kmi.properties.object = False
 kmi.properties.enumerate = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', alt=True)
 kmi.properties.enumerate = True
 kmi.properties.extend = False
 kmi.properties.toggle = False
 kmi.properties.deselect = False
 kmi.properties.center = False
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, ctrl=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True, ctrl=True)
 kmi.properties.extend = True
 kmi.properties.center = True
 kmi.properties.toggle = False
 kmi.properties.deselect = False
 kmi.properties.object = False
 kmi.properties.enumerate = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', ctrl=True, alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', ctrl=True, alt=True)
 kmi.properties.center = True
 kmi.properties.enumerate = True
 kmi.properties.extend = False
 kmi.properties.toggle = False
 kmi.properties.deselect = False
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.enumerate = True
 kmi.properties.toggle = False
 kmi.properties.deselect = False
 kmi.properties.center = False
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'LEFTMOUSE', 'CLICK', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.center = True
 kmi.properties.enumerate = True
 kmi.properties.toggle = False
 kmi.properties.deselect = False
 kmi.properties.object = False
-kmi = km.keymap_items.new('view3d.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('view3d.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('view3d.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('view3d.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_M', 'ANY')
 kmi.properties.extend = False
 kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_M', 'ANY', ctrl=True)
@@ -1104,9 +1104,9 @@ kmi = km.keymap_items.new('anim.channels_rename', 'LEFTMOUSE', 'PRESS', ctrl=Tru
 kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'A', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'I', 'PRESS', ctrl=True)
 kmi.properties.invert = True
-kmi = km.keymap_items.new('anim.channels_select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('anim.channels_select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('anim.channels_select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('anim.channels_select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('anim.channels_delete', 'BACK_SPACE', 'PRESS')
 kmi = km.keymap_items.new('anim.channels_delete', 'DEL', 'PRESS')
 kmi = km.keymap_items.new('anim.channels_setting_toggle', 'W', 'PRESS', shift=True)
@@ -1134,18 +1134,18 @@ km = kc.keymaps.new('UV Editor', space_type='EMPTY', region_type='WINDOW', modal
 kmi = km.keymap_items.new('wm.context_toggle', 'Q', 'PRESS')
 kmi.properties.data_path = 'tool_settings.use_uv_sculpt'
 kmi = km.keymap_items.new('uv.mark_seam', 'E', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'CLICK')
+kmi = km.keymap_items.new('uv.select', 'LEFTMOUSE', 'CLICK')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'CLICK', shift=True)
+kmi = km.keymap_items.new('uv.select', 'LEFTMOUSE', 'CLICK', shift=True)
 kmi.properties.extend = True
 kmi = km.keymap_items.new('uv.select_loop', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi = km.keymap_items.new('uv.select_loop', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('uv.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('uv.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
 kmi.properties.pinned = False
-kmi = km.keymap_items.new('uv.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('uv.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi.properties.pinned = False
 kmi = km.keymap_items.new('uv.circle_select', 'Q', 'PRESS', shift=True)
 kmi = km.keymap_items.new('uv.select_linked', 'L', 'PRESS', ctrl=True)
@@ -1175,7 +1175,7 @@ kmi = km.keymap_items.new('uv.hide', 'H', 'PRESS', alt=True)
 kmi.properties.unselected = True
 kmi = km.keymap_items.new('uv.reveal', 'H', 'PRESS', shift=True)
 kmi = km.keymap_items.new('uv.cursor_set', 'RIGHTMOUSE', 'PRESS', key_modifier='C')
-kmi = km.keymap_items.new('uv.tile_set', 'ACTIONMOUSE', 'PRESS', shift=True, key_modifier='C')
+kmi = km.keymap_items.new('uv.tile_set', 'RIGHTMOUSE', 'PRESS', shift=True, key_modifier='C')
 kmi = km.keymap_items.new('wm.call_menu', 'S', 'PRESS', shift=True)
 kmi.properties.name = 'IMAGE_MT_uvs_snap'
 kmi = km.keymap_items.new('wm.call_menu', 'RIGHTMOUSE', 'PRESS')
@@ -1304,27 +1304,27 @@ kmi = km.keymap_items.new('wm.context_toggle', 'H', 'PRESS', ctrl=True)
 kmi.properties.data_path = 'space_data.show_handles'
 kmi = km.keymap_items.new('graph.cursor_set', 'LEFTMOUSE', 'PRESS', key_modifier='K')
 kmi.properties.value = 1.1754943508222875e-38
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'CLICK')
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'CLICK')
 kmi.properties.extend = False
 kmi.properties.column = False
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
 kmi.properties.column = True
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'CLICK', shift=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'CLICK', shift=True)
 kmi.properties.extend = True
 kmi.properties.column = False
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'CLICK', shift=True, alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'CLICK', shift=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.column = True
 kmi.properties.curves = False
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi.properties.extend = False
 kmi.properties.column = False
 kmi.properties.curves = True
-kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'CLICK', shift=True, ctrl=True, alt=True)
+kmi = km.keymap_items.new('graph.clickselect', 'LEFTMOUSE', 'CLICK', shift=True, ctrl=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.column = False
 kmi.properties.curves = True
@@ -1338,11 +1338,11 @@ kmi = km.keymap_items.new('graph.select_all_toggle', 'A', 'PRESS', ctrl=True)
 kmi.properties.invert = False
 kmi = km.keymap_items.new('graph.select_all_toggle', 'I', 'PRESS', ctrl=True)
 kmi.properties.invert = True
-kmi = km.keymap_items.new('graph.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('graph.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
 kmi.properties.axis_range = False
 kmi.properties.include_handles = False
-kmi = km.keymap_items.new('graph.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('graph.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi.properties.axis_range = False
 kmi.properties.include_handles = False
 kmi = km.keymap_items.new('graph.select_more', 'PERIOD', 'PRESS', shift=True)
@@ -1371,7 +1371,7 @@ kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
 kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('graph.copy', 'C', 'PRESS', oskey=True)
 kmi = km.keymap_items.new('graph.paste', 'V', 'PRESS', oskey=True)
-kmi = km.keymap_items.new('graph.select_all_toggle', 'SELECTMOUSE', 'DOUBLE_CLICK')
+kmi = km.keymap_items.new('graph.select_all_toggle', 'LEFTMOUSE', 'DOUBLE_CLICK')
 
 # Map Image
 km = kc.keymaps.new('Image', space_type='IMAGE_EDITOR', region_type='WINDOW', modal=False)
@@ -1402,10 +1402,10 @@ kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_4', 'PRESS')
 kmi.properties.ratio = 0.25
 kmi = km.keymap_items.new('image.view_zoom_ratio', 'NUMPAD_8', 'PRESS')
 kmi.properties.ratio = 0.125
-kmi = km.keymap_items.new('image.sample', 'ACTIONMOUSE', 'PRESS')
-kmi = km.keymap_items.new('image.curves_point_set', 'ACTIONMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('image.sample', 'RIGHTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('image.curves_point_set', 'RIGHTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.point = 'BLACK_POINT'
-kmi = km.keymap_items.new('image.curves_point_set', 'ACTIONMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('image.curves_point_set', 'RIGHTMOUSE', 'PRESS', shift=True)
 kmi.properties.point = 'WHITE_POINT'
 kmi = km.keymap_items.new('object.mode_set', 'TAB', 'PRESS')
 kmi.properties.mode = 'EDIT'
@@ -1438,14 +1438,14 @@ kmi.properties.value = 7
 # Map Node Editor
 km = kc.keymaps.new('Node Editor', space_type='NODE_EDITOR', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('node.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('node.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('node.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
 kmi.properties.tweak = True
-kmi = km.keymap_items.new('node.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('node.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi.properties.tweak = True
 kmi = km.keymap_items.new('node.link', 'LEFTMOUSE', 'PRESS')
 kmi = km.keymap_items.new('node.resize', 'LEFTMOUSE', 'PRESS')
@@ -1456,7 +1456,7 @@ kmi = km.keymap_items.new('node.backimage_zoom', 'V', 'PRESS')
 kmi.properties.factor = 0.833329975605011
 kmi = km.keymap_items.new('node.backimage_zoom', 'V', 'PRESS', alt=True)
 kmi.properties.factor = 1.2000000476837158
-kmi = km.keymap_items.new('node.backimage_sample', 'ACTIONMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('node.backimage_sample', 'RIGHTMOUSE', 'PRESS', alt=True)
 kmi = km.keymap_items.new('node.link_make', 'F', 'PRESS')
 kmi.properties.replace = False
 kmi = km.keymap_items.new('node.link_make', 'F', 'PRESS', ctrl=True)
@@ -1488,13 +1488,13 @@ kmi = km.keymap_items.new('node.read_viewlayers', 'R', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('node.read_fullsamplelayers', 'R', 'PRESS', shift=True)
 kmi = km.keymap_items.new('node.render_changed', 'Z', 'PRESS')
 kmi = km.keymap_items.new('node.translate_attach', 'W', 'PRESS')
-kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_A', 'ANY')
-kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_R', 'ANY')
+kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.rotate', 'E', 'PRESS')
 kmi = km.keymap_items.new('transform.resize', 'R', 'PRESS')
 kmi = km.keymap_items.new('node.move_detach_links', 'D', 'PRESS', alt=True)
-kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_A', 'ANY', alt=True)
-kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_S', 'ANY', alt=True)
+kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_R', 'ANY', alt=True)
+kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_L', 'ANY', alt=True)
 
 # Map File Browser Main
 km = kc.keymaps.new('File Browser Main', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
@@ -1510,9 +1510,9 @@ kmi.properties.extend = True
 kmi.properties.fill = True
 kmi = km.keymap_items.new('file.select_all_toggle', 'A', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('file.refresh', 'F', 'PRESS')
-kmi = km.keymap_items.new('file.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('file.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('file.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('file.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('file.rename', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('file.highlight', 'MOUSEMOVE', 'ANY', any=True)
 kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS')
@@ -1553,10 +1553,10 @@ kmi = km.keymap_items.new('action.select_all_toggle', 'A', 'PRESS', ctrl=True)
 kmi.properties.invert = False
 kmi = km.keymap_items.new('action.select_all_toggle', 'I', 'PRESS', ctrl=True)
 kmi.properties.invert = True
-kmi = km.keymap_items.new('action.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('action.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
 kmi.properties.axis_range = False
-kmi = km.keymap_items.new('action.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('action.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi.properties.axis_range = False
 kmi = km.keymap_items.new('action.select_more', 'PERIOD', 'PRESS', shift=True)
 kmi = km.keymap_items.new('action.select_less', 'COMMA', 'PRESS', shift=True)
@@ -1589,7 +1589,7 @@ kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')
 kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('action.copy', 'C', 'PRESS', oskey=True)
 kmi = km.keymap_items.new('action.paste', 'V', 'PRESS', oskey=True)
-kmi = km.keymap_items.new('action.select_all_toggle', 'SELECTMOUSE', 'DOUBLE_CLICK')
+kmi = km.keymap_items.new('action.select_all_toggle', 'LEFTMOUSE', 'DOUBLE_CLICK')
 
 # Map NLA Channels
 km = kc.keymaps.new('NLA Channels', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
@@ -1608,14 +1608,14 @@ kmi = km.keymap_items.new('nla.tracks_delete', 'DEL', 'PRESS')
 # Map NLA Editor
 km = kc.keymaps.new('NLA Editor', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'CLICK')
+kmi = km.keymap_items.new('nla.click_select', 'LEFTMOUSE', 'CLICK')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('nla.click_select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
-kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('nla.select_leftright', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = False
-kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('nla.select_leftright', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.mode = 'CHECK'
 kmi.properties.extend = True
 kmi = km.keymap_items.new('nla.select_leftright', 'LEFT_BRACKET', 'PRESS')
@@ -1628,10 +1628,10 @@ kmi = km.keymap_items.new('nla.select_all_toggle', 'A', 'PRESS', ctrl=True)
 kmi.properties.invert = False
 kmi = km.keymap_items.new('nla.select_all_toggle', 'I', 'PRESS', ctrl=True)
 kmi.properties.invert = True
-kmi = km.keymap_items.new('nla.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('nla.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
 kmi.properties.axis_range = False
-kmi = km.keymap_items.new('nla.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('nla.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi.properties.axis_range = False
 kmi = km.keymap_items.new('nla.view_all', 'A', 'PRESS')
 kmi = km.keymap_items.new('nla.view_selected', 'F', 'PRESS')
@@ -1730,32 +1730,32 @@ kmi = km.keymap_items.new('sequencer.cut_multicam', 'NINE', 'PRESS')
 kmi.properties.camera = 9
 kmi = km.keymap_items.new('sequencer.cut_multicam', 'ZERO', 'PRESS')
 kmi.properties.camera = 10
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'CLICK')
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'CLICK')
 kmi.properties.extend = False
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'CLICK', shift=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'CLICK', shift=True)
 kmi.properties.extend = True
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', alt=True)
 kmi.properties.extend = False
 kmi.properties.linked_handle = True
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'CLICK', shift=True, alt=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'CLICK', shift=True, alt=True)
 kmi.properties.extend = True
 kmi.properties.linked_handle = True
 kmi.properties.left_right = 'NONE'
 kmi.properties.linked_time = False
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', ctrl=True)
 kmi.properties.extend = False
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'MOUSE'
 kmi.properties.linked_time = True
-kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
+kmi = km.keymap_items.new('sequencer.select', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)
 kmi.properties.extend = True
 kmi.properties.linked_handle = False
 kmi.properties.left_right = 'NONE'
@@ -1767,9 +1767,9 @@ kmi.properties.extend = False
 kmi = km.keymap_items.new('sequencer.select_linked_pick', 'L', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi = km.keymap_items.new('sequencer.select_linked', 'L', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('sequencer.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('sequencer.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('sequencer.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('sequencer.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('sequencer.select_grouped', 'G', 'PRESS', shift=True)
 kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
 kmi.properties.name = 'SEQUENCER_MT_add'
@@ -1823,17 +1823,17 @@ kmi.properties.position = 'FAILEDPREV'
 kmi = km.keymap_items.new('clip.frame_jump', 'RIGHT_ARROW', 'PRESS', shift=True, alt=True)
 kmi.properties.position = 'PATHSTART'
 kmi = km.keymap_items.new('clip.change_frame', 'LEFTMOUSE', 'PRESS')
-kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('clip.select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('clip.select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi = km.keymap_items.new('clip.select_all', 'A', 'PRESS', ctrl=True)
 kmi.properties.action = 'TOGGLE'
 kmi = km.keymap_items.new('clip.select_all', 'I', 'PRESS', ctrl=True)
 kmi.properties.action = 'INVERT'
-kmi = km.keymap_items.new('clip.select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('clip.select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('clip.select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('clip.select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('clip.select_circle', 'Q', 'PRESS', shift=True)
 kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', shift=True)
 kmi.properties.name = 'CLIP_MT_select_grouped'
@@ -1866,7 +1866,7 @@ kmi.properties.data_path = 'space_data.show_marker_search'
 kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')
 kmi.properties.data_path = 'space_data.use_mute_footage'
 kmi = km.keymap_items.new('transform.translate', 'W', 'PRESS')
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.resize', 'R', 'PRESS')
 kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', alt=True)
 kmi.properties.action = 'REMAINED'
@@ -1881,18 +1881,18 @@ kmi.properties.clear_active = False
 # Map Clip Graph Editor
 km = kc.keymaps.new('Clip Graph Editor', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)
 
-kmi = km.keymap_items.new('clip.change_frame', 'ACTIONMOUSE', 'PRESS')
-kmi = km.keymap_items.new('clip.graph_select', 'SELECTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('clip.change_frame', 'RIGHTMOUSE', 'PRESS')
+kmi = km.keymap_items.new('clip.graph_select', 'LEFTMOUSE', 'PRESS')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('clip.graph_select', 'SELECTMOUSE', 'PRESS', shift=True)
+kmi = km.keymap_items.new('clip.graph_select', 'LEFTMOUSE', 'PRESS', shift=True)
 kmi.properties.extend = True
 kmi = km.keymap_items.new('clip.graph_select_all_markers', 'A', 'PRESS')
 kmi.properties.action = 'TOGGLE'
 kmi = km.keymap_items.new('clip.graph_select_all_markers', 'I', 'PRESS', ctrl=True)
 kmi.properties.action = 'INVERT'
-kmi = km.keymap_items.new('clip.graph_select_box', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('clip.graph_select_box', 'EVT_TWEAK_L', 'ANY')
 kmi.properties.extend = False
-kmi = km.keymap_items.new('clip.graph_select_box', 'EVT_TWEAK_S', 'ANY', any=True)
+kmi = km.keymap_items.new('clip.graph_select_box', 'EVT_TWEAK_L', 'ANY', any=True)
 kmi = km.keymap_items.new('clip.graph_delete_curve', 'DEL', 'PRESS')
 kmi = km.keymap_items.new('clip.graph_delete_curve', 'BACK_SPACE', 'PRESS')
 kmi = km.keymap_items.new('clip.graph_delete_knot', 'DEL', 'PRESS', shift=True)
@@ -1913,5 +1913,5 @@ kmi.properties.clear_active = True
 kmi = km.keymap_items.new('clip.graph_disable_markers', 'D', 'PRESS', shift=True)
 kmi.properties.action = 'TOGGLE'
 kmi = km.keymap_items.new('transform.translate', 'W', 'PRESS')
-kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
+kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_L', 'ANY')
 kmi = km.keymap_items.new('transform.resize', 'R', 'PRESS')
index f082fd308c6a1907e52bcc3998bbfd76fa997810..a45013583d6cfebe2320d5ba88c58be143ee6ece 100644 (file)
@@ -2592,11 +2592,12 @@ class WM_MT_splash(Menu):
             text = "Blender"
         sub.menu("USERPREF_MT_keyconfigs", text=text)
 
-        sub = col.split(factor=0.35)
-        row = sub.row()
-        row.alignment = 'RIGHT'
-        row.label(text="Select With")
-        sub.row().prop(userpref.inputs, 'select_mouse', expand=True)
+        if wm.keyconfigs.active.has_select_mouse:
+            sub = col.split(factor=0.35)
+            row = sub.row()
+            row.alignment = 'RIGHT'
+            row.label(text="Select With")
+            sub.row().prop(userpref.inputs, 'select_mouse', expand=True)
 
         col.separator()
 
@@ -2617,7 +2618,9 @@ class WM_MT_splash(Menu):
         #userpref = context.user_preferences
         #sub.prop(userpref.system, "language", text="")
 
-        col.label()
+        # Keep height constant
+        if not wm.keyconfigs.active.has_select_mouse:
+            col.label()
 
         layout.label()
 
index e06224b8924ff5020805e9ba579819a8d1607e2f..7625f07043a140fdb030d66543673eeed2bb34ff 100644 (file)
@@ -927,8 +927,6 @@ def keymap_from_context(context, space_type):
                     'BUTTON5MOUSE',
                     'BUTTON6MOUSE',
                     'BUTTON7MOUSE',
-                    'ACTIONMOUSE',
-                    'SELECTMOUSE',
             }:
                 kmi_found_type = kmi_found.key_modifier
                 # excludes 'NONE'
index 149206fc151a933940e52b9144de258fddc57f7e..e661ccec37cc37859d49dffe0cbf0ea090f29bd0 100644 (file)
@@ -1087,15 +1087,15 @@ class USERPREF_PT_input(Panel):
         sub.separator()
 
         sub.label(text="Mouse:")
-        sub1 = sub.column()
-        sub1.active = (inputs.select_mouse == 'RIGHT')
-        sub1.prop(inputs, "use_mouse_emulate_3_button")
+        sub.prop(inputs, "use_mouse_emulate_3_button")
         sub.prop(inputs, "use_mouse_continuous")
         sub.prop(inputs, "drag_threshold")
         sub.prop(inputs, "tweak_threshold")
 
-        sub.label(text="Select With:")
-        sub.row().prop(inputs, "select_mouse", expand=True)
+        wm = bpy.context.window_manager
+        if wm.keyconfigs.active.has_select_mouse:
+            sub.label(text="Select With:")
+            sub.row().prop(inputs, "select_mouse", expand=True)
 
         sub = col.column()
         sub.label(text="Double Click:")
index 920a23b081a099fbc8920eea62f50703911f3129..d9aeb294c68365b87705d239652bacf9396b4c88 100644 (file)
@@ -17,8 +17,8 @@ def my_tool():
         icon="ops.generic.select_circle",
         widget=None,
         keymap=(
-            ("view3d.select_circle", dict(deselect=False), dict(type='ACTIONMOUSE', value='PRESS')),
-            ("view3d.select_circle", dict(deselect=True), dict(type='ACTIONMOUSE', value='PRESS', ctrl=True)),
+            ("view3d.select_circle", dict(deselect=False), dict(type='LEFTMOUSE', value='PRESS')),
+            ("view3d.select_circle", dict(deselect=True), dict(type='LEFTMOUSE', value='PRESS', ctrl=True)),
         ),
         draw_settings=draw_settings,
     )
index b695132416ec15433624cba15d4285b77c6559ee..34a486dd66f959f0a83db889f1c4a42f514e45c0 100644 (file)
@@ -28,7 +28,7 @@
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         280
-#define BLENDER_SUBVERSION      30
+#define BLENDER_SUBVERSION      31
 /* Several breakages with 280, e.g. collections vs layers */
 #define BLENDER_MINVERSION      280
 #define BLENDER_MINSUBVERSION   0
index e0453e71a0582e5a6722cad68c8c860dd2854290..49987cb860cc100ea7afd44746380f4375b3a184 100644 (file)
@@ -36,6 +36,7 @@ set(INC
        ../makesrna
        ../nodes
        ../render/extern/include
+       ../windowmanager
        ../../../intern/guardedalloc
 
        # for writefile.c: dna_type_offsets.h
index b14b17cbd8f293a1d51214aa2a70f01596fa0b48..2cf117067c2c0bc39768b4c7711691c2194dd226 100644 (file)
@@ -40,6 +40,8 @@
 
 #include "BLO_readfile.h"  /* Own include. */
 
+#include "wm_event_types.h"
+
 /* Disallow access to global userdef. */
 #define U (_error_)
 
@@ -92,6 +94,26 @@ static void do_versions_theme(UserDef *userdef, bTheme *btheme)
 #undef USER_VERSION_ATLEAST
 }
 
+static void do_version_select_mouse(UserDef *userdef, wmKeyMapItem *kmi)
+{
+       /* Remove select/action mouse from user defined keymaps. */
+       enum {
+               ACTIONMOUSE = 0x0005,
+               SELECTMOUSE = 0x0006,
+               EVT_TWEAK_A = 0x5005,
+               EVT_TWEAK_S = 0x5006,
+       };
+       const bool left = (userdef->flag & USER_LMOUSESELECT) != 0;
+
+       switch (kmi->type) {
+               case SELECTMOUSE: kmi->type = (left) ? LEFTMOUSE : RIGHTMOUSE; break;
+               case ACTIONMOUSE: kmi->type = (left) ? RIGHTMOUSE : LEFTMOUSE; break;
+               case EVT_TWEAK_S: kmi->type = (left) ? EVT_TWEAK_L : EVT_TWEAK_R; break;
+               case EVT_TWEAK_A: kmi->type = (left) ? EVT_TWEAK_R : EVT_TWEAK_L; break;
+               default: break;
+       }
+}
+
 /* patching UserDef struct and Themes */
 void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
 {
@@ -353,6 +375,24 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
                }
        }
 
+       if (!USER_VERSION_ATLEAST(280, 31)) {
+               /* Remove select/action mouse from user defined keymaps. */
+               for (wmKeyMap *keymap = userdef->user_keymaps.first; keymap; keymap = keymap->next) {
+                       for (wmKeyMapDiffItem *kmdi = keymap->diff_items.first; kmdi; kmdi = kmdi->next) {
+                               if (kmdi->remove_item) {
+                                       do_version_select_mouse(userdef, kmdi->remove_item);
+                               }
+                               if (kmdi->add_item) {
+                                       do_version_select_mouse(userdef, kmdi->add_item);
+                               }
+                       }
+
+                       for (wmKeyMapItem *kmi = keymap->items.first; kmi; kmi = kmi->next) {
+                               do_version_select_mouse(userdef, kmi);
+                       }
+               }
+       }
+
        /**
         * Include next version bump.
         */
index f6fdd539983fa42bf692093594d26fe05afd7db0..8914cf9492c46931e48f4f610e20033f7910757f 100644 (file)
@@ -231,9 +231,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, const wmEvent *event)
                case LEFTMOUSE:
                case RIGHTMOUSE:
                case MIDDLEMOUSE:
-                       /* we check for either mouse-button to end, as checking for ACTIONMOUSE (which is used to init
-                        * the modal op) doesn't work for some reason
-                        */
+                       /* We check for either mouse-button to end, to work with all user keymaps. */
                        if (event->val == KM_RELEASE)
                                ret = OPERATOR_FINISHED;
                        break;
index a6cc047d2dcc7ee69f9386c2b9f3e437977eade6..4ed6a980fcb2767a8e333894df89287b0425beea 100644 (file)
@@ -196,9 +196,7 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, const wmEvent *ev
                case LEFTMOUSE:
                case RIGHTMOUSE:
                case MIDDLEMOUSE:
-                       /* we check for either mouse-button to end, as checking for ACTIONMOUSE (which is used to init
-                        * the modal op) doesn't work for some reason
-                        */
+                       /* We check for either mouse-button to end, to work with all user keymaps. */
                        if (event->val == KM_RELEASE) {
                                if (screen)
                                        screen->scrubbing = false;
index e51933f5a2262f70ac3c8154acc40dc730ba18ef..26ab24d8f9df34f3d56baa87e105c5f38f94db72 100644 (file)
@@ -355,13 +355,18 @@ typedef struct wmKeyConfig {
        char basename[64];  /* idname of configuration this is derives from, "" if none */
 
        ListBase keymaps;
-       int actkeymap, flag;
+       int actkeymap;
+       short flag;
+
+       /* Supports select mouse switching? */
+       char has_select_mouse;  /* may remove in favor of custom properties. */
+       char _pad0;
 } wmKeyConfig;
 
 /* wmKeyConfig.flag */
 enum {
        KEYCONF_USER          = (1 << 1),  /* And what about (1 << 0)? */
-       KEYCONF_INIT_DEFAULT  = (1 << 2),
+       KEYCONF_INIT_DEFAULT  = (1 << 2),  /* Has default keymap been initialized? */
 };
 
 /* this one is the operator itself, stored in files for macros etc */
index 4e79c516ae348a2be7aa6af90f6a32b780d93991..d7c256c2223279309d6ddbb3e12f6373727bd134 100644 (file)
@@ -74,8 +74,6 @@ static const EnumPropertyItem event_tweak_type_items[] = {
        {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""},
        {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""},
        {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""},
-       {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Action", ""},
-       {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Select", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
@@ -87,8 +85,6 @@ static const EnumPropertyItem event_mouse_type_items[] = {
        {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5", ""},
        {BUTTON6MOUSE, "BUTTON6MOUSE", 0, "Button6", ""},
        {BUTTON7MOUSE, "BUTTON7MOUSE", 0, "Button7", ""},
-       {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action", ""},
-       {SELECTMOUSE, "SELECTMOUSE", 0, "Select", ""},
        {0, "", 0, NULL, NULL},
        {TABLET_STYLUS, "PEN", 0, "Pen", ""},
        {TABLET_ERASER, "ERASER", 0, "Eraser", ""},
@@ -184,8 +180,6 @@ const EnumPropertyItem rna_enum_event_type_items[] = {
        {BUTTON5MOUSE, "BUTTON5MOUSE", 0, "Button5 Mouse", "MB5"},
        {BUTTON6MOUSE, "BUTTON6MOUSE", 0, "Button6 Mouse", "MB6"},
        {BUTTON7MOUSE, "BUTTON7MOUSE", 0, "Button7 Mouse", "MB7"},
-       {ACTIONMOUSE, "ACTIONMOUSE", 0, "Action Mouse", "MBA"},
-       {SELECTMOUSE, "SELECTMOUSE", 0, "Select Mouse", "MBS"},
        {0, "", 0, NULL, NULL},
        {TABLET_STYLUS, "PEN", 0, "Pen", ""},
        {TABLET_ERASER, "ERASER", 0, "Eraser", ""},
@@ -204,8 +198,6 @@ const EnumPropertyItem rna_enum_event_type_items[] = {
        {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Tweak Left", "TwkL"},
        {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Tweak Middle", "TwkM"},
        {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Tweak Right", "TwkR"},
-       {EVT_TWEAK_A, "EVT_TWEAK_A", 0, "Tweak Action", "TwkA"},
-       {EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Tweak Select", "TwkS"},
        {0, "", 0, NULL, NULL},
        {AKEY, "A", 0, "A", ""},
        {BKEY, "B", 0, "B", ""},
@@ -2241,6 +2233,10 @@ static void rna_def_keyconfig(BlenderRNA *brna)
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "User Defined", "Indicates that a keyconfig was defined by the user");
 
+       prop = RNA_def_property(srna, "has_select_mouse", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "has_select_mouse", 1);
+       RNA_def_property_ui_text(prop, "Has Select Mouse", "Configuration supports select mouse switching");
+
        RNA_api_keyconfig(srna);
 
        /* KeyMap */
index 90a0ff8b6518ea047536177107bbdb82f5894536..5cafbaf6b038ab98284b7d605ce3deae83c2a31a 100644 (file)
@@ -693,16 +693,19 @@ wmKeyMap *WM_gizmogroup_keymap_common_select(
 {
        /* Use area and region id since we might have multiple gizmos with the same name in different areas/regions */
        wmKeyMap *km = WM_keymap_ensure(config, gzgt->name, gzgt->gzmap_params.spaceid, gzgt->gzmap_params.regionid);
+       const int select_mouse = (U.flag & USER_LMOUSESELECT) ? LEFTMOUSE : RIGHTMOUSE;
+       const int select_tweak = (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_L : EVT_TWEAK_R;
+       const int action_mouse = (U.flag & USER_LMOUSESELECT) ? RIGHTMOUSE : LEFTMOUSE;
 
-       WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_tweak", ACTIONMOUSE, KM_PRESS, KM_ANY, 0);
-       WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_tweak", EVT_TWEAK_S, KM_ANY, 0, 0);
+       WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_tweak", action_mouse, KM_PRESS, KM_ANY, 0);
+       WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_tweak", select_tweak, KM_ANY, 0, 0);
        gizmogroup_tweak_modal_keymap(config, gzgt->name);
 
-       wmKeyMapItem *kmi = WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_select", SELECTMOUSE, KM_PRESS, 0, 0);
+       wmKeyMapItem *kmi = WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_select", select_mouse, KM_PRESS, 0, 0);
        RNA_boolean_set(kmi->ptr, "extend", false);
        RNA_boolean_set(kmi->ptr, "deselect", false);
        RNA_boolean_set(kmi->ptr, "toggle", false);
-       kmi = WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(km, "GIZMOGROUP_OT_gizmo_select", select_mouse, KM_PRESS, KM_SHIFT, 0);
        RNA_boolean_set(kmi->ptr, "extend", false);
        RNA_boolean_set(kmi->ptr, "deselect", false);
        RNA_boolean_set(kmi->ptr, "toggle", true);
index fcda06a7c2d3c9db597891c789779337dc889738..63c45407135c1d4a74e5a1f2185bf91cc818fcc4 100644 (file)
@@ -1769,14 +1769,6 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers)
 int WM_userdef_event_map(int kmitype)
 {
        switch (kmitype) {
-               case SELECTMOUSE:
-                       return (U.flag & USER_LMOUSESELECT) ? LEFTMOUSE : RIGHTMOUSE;
-               case ACTIONMOUSE:
-                       return (U.flag & USER_LMOUSESELECT) ? RIGHTMOUSE : LEFTMOUSE;
-               case EVT_TWEAK_A:
-                       return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_R : EVT_TWEAK_L;
-               case EVT_TWEAK_S:
-                       return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_L : EVT_TWEAK_R;
                case WHEELOUTMOUSE:
                        return (U.uiflag & USER_WHEELZOOMDIR) ? WHEELUPMOUSE : WHEELDOWNMOUSE;
                case WHEELINMOUSE:
@@ -1794,14 +1786,6 @@ int WM_userdef_event_map(int kmitype)
 int WM_userdef_event_type_from_keymap_type(int kmitype)
 {
        switch (kmitype) {
-               case SELECTMOUSE:
-                       return (U.flag & USER_LMOUSESELECT) ? LEFTMOUSE : RIGHTMOUSE;
-               case ACTIONMOUSE:
-                       return (U.flag & USER_LMOUSESELECT) ? RIGHTMOUSE : LEFTMOUSE;
-               case EVT_TWEAK_S:
-                       return (U.flag & USER_LMOUSESELECT) ? LEFTMOUSE : RIGHTMOUSE;
-               case EVT_TWEAK_A:
-                       return (U.flag & USER_LMOUSESELECT) ? RIGHTMOUSE : LEFTMOUSE;
                case EVT_TWEAK_L:
                        return LEFTMOUSE;
                case EVT_TWEAK_M:
index cfb43bf43ed579091448fcf11ef64f091fe05774..40a3d148b7b632b8c4693ba7b870f6a83fa83e40 100644 (file)
@@ -61,9 +61,6 @@ enum {
        MIDDLEMOUSE         = 0x0002,
        RIGHTMOUSE          = 0x0003,
        MOUSEMOVE           = 0x0004,
-       /* only use if you want user option switch possible */
-       ACTIONMOUSE         = 0x0005,
-       SELECTMOUSE         = 0x0006,
        /* Extra mouse buttons */
        BUTTON4MOUSE        = 0x0007,
        BUTTON5MOUSE        = 0x0008,
@@ -324,9 +321,6 @@ enum {
        EVT_TWEAK_L           = 0x5002,
        EVT_TWEAK_M           = 0x5003,
        EVT_TWEAK_R           = 0x5004,
-       /* tweak events for action or select mousebutton */
-       EVT_TWEAK_A           = 0x5005,
-       EVT_TWEAK_S           = 0x5006,
        EVT_GESTURE           = 0x5010,
 
        /* 0x5011 is taken, see EVT_ACTIONZONE_FULLSCREEN */
@@ -371,7 +365,7 @@ enum {
 #define ISMOUSE_GESTURE(event_type)  ((event_type) >= MOUSEPAN && (event_type) <= MOUSEROTATE)
 #define ISMOUSE_BUTTON(event_type) \
        (ELEM(event_type, \
-             LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE, ACTIONMOUSE, SELECTMOUSE, \
+             LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE, \
              BUTTON4MOUSE, BUTTON5MOUSE, BUTTON6MOUSE, BUTTON7MOUSE))
 
 /* test whether the event is tweak event */