Best JavaScript code snippet using cavy
3dsmax.py
Source:3dsmax.py
1# Configuration 3dsmax2import bpy3wm = bpy.context.window_manager4kc = wm.keyconfigs.new('3dsmax')5# Map Window6km = kc.keymaps.new('Window', space_type='EMPTY', region_type='WINDOW', modal=False)7kmi = km.keymap_items.new('wm.window_duplicate', 'W', 'PRESS', ctrl=True, alt=True)8kmi = km.keymap_items.new('wm.read_homefile', 'N', 'PRESS', ctrl=True)9kmi = km.keymap_items.new('wm.save_homefile', 'U', 'PRESS', ctrl=True)10kmi = km.keymap_items.new('wm.call_menu', 'O', 'PRESS', shift=True, ctrl=True)11kmi.properties.name = 'INFO_MT_file_open_recent'12kmi = km.keymap_items.new('wm.open_mainfile', 'O', 'PRESS', ctrl=True)13kmi = km.keymap_items.new('wm.open_mainfile', 'F1', 'PRESS')14kmi = km.keymap_items.new('wm.link', 'O', 'PRESS', ctrl=True, alt=True)15kmi = km.keymap_items.new('wm.append', 'F1', 'PRESS', shift=True)16kmi.properties.link = False17kmi.properties.instance_groups = False18kmi = km.keymap_items.new('wm.save_mainfile', 'S', 'PRESS', ctrl=True)19kmi = km.keymap_items.new('wm.save_mainfile', 'W', 'PRESS', ctrl=True)20kmi = km.keymap_items.new('wm.save_as_mainfile', 'S', 'PRESS', shift=True, ctrl=True)21kmi = km.keymap_items.new('wm.save_as_mainfile', 'F2', 'PRESS')22kmi = km.keymap_items.new('wm.save_as_mainfile', 'S', 'PRESS', ctrl=True, alt=True)23kmi.properties.copy = True24kmi = km.keymap_items.new('wm.window_fullscreen_toggle', 'F11', 'PRESS', alt=True)25kmi = km.keymap_items.new('wm.quit_blender', 'Q', 'PRESS', ctrl=True)26kmi = km.keymap_items.new('wm.redraw_timer', 'T', 'PRESS', ctrl=True, alt=True)27kmi = km.keymap_items.new('wm.debug_menu', 'D', 'PRESS', ctrl=True, alt=True)28kmi = km.keymap_items.new('wm.search_menu', 'SPACE', 'PRESS')29kmi = km.keymap_items.new('wm.call_menu', 'NDOF_BUTTON_MENU', 'PRESS')30kmi.properties.name = 'USERPREF_MT_ndof_settings'31kmi = km.keymap_items.new('wm.context_set_enum', 'F2', 'PRESS', shift=True)32kmi.properties.data_path = 'area.type'33kmi.properties.value = 'LOGIC_EDITOR'34kmi = km.keymap_items.new('wm.context_set_enum', 'F3', 'PRESS', shift=True, ctrl=True)35kmi.properties.data_path = 'area.type'36kmi.properties.value = 'NODE_EDITOR'37kmi = km.keymap_items.new('wm.context_set_enum', 'F4', 'PRESS', shift=True)38kmi.properties.data_path = 'area.type'39kmi.properties.value = 'CONSOLE'40kmi = km.keymap_items.new('wm.context_set_enum', 'F5', 'PRESS', shift=True)41kmi.properties.data_path = 'area.type'42kmi.properties.value = 'VIEW_3D'43kmi = km.keymap_items.new('wm.context_set_enum', 'F6', 'PRESS', shift=True)44kmi.properties.data_path = 'area.type'45kmi.properties.value = 'GRAPH_EDITOR'46kmi = km.keymap_items.new('wm.context_set_enum', 'F7', 'PRESS', shift=True)47kmi.properties.data_path = 'area.type'48kmi.properties.value = 'PROPERTIES'49kmi = km.keymap_items.new('wm.context_set_enum', 'F8', 'PRESS', shift=True)50kmi.properties.data_path = 'area.type'51kmi.properties.value = 'SEQUENCE_EDITOR'52kmi = km.keymap_items.new('wm.context_set_enum', 'F9', 'PRESS', shift=True)53kmi.properties.data_path = 'area.type'54kmi.properties.value = 'OUTLINER'55kmi = km.keymap_items.new('wm.context_set_enum', 'F10', 'PRESS', shift=True, ctrl=True)56kmi.properties.data_path = 'area.type'57kmi.properties.value = 'IMAGE_EDITOR'58kmi = km.keymap_items.new('wm.context_set_enum', 'F11', 'PRESS', shift=True)59kmi.properties.data_path = 'area.type'60kmi.properties.value = 'TEXT_EDITOR'61kmi = km.keymap_items.new('wm.context_set_enum', 'F12', 'PRESS', shift=True)62kmi.properties.data_path = 'area.type'63kmi.properties.value = 'DOPESHEET_EDITOR'64kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_PLUS', 'PRESS')65kmi.properties.data_path = 'user_preferences.inputs.ndof_sensitivity'66kmi.properties.value = 1.167kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_MINUS', 'PRESS')68kmi.properties.data_path = 'user_preferences.inputs.ndof_sensitivity'69kmi.properties.value = 1.0 / 1.170kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_PLUS', 'PRESS', shift=True)71kmi.properties.data_path = 'user_preferences.inputs.ndof_sensitivity'72kmi.properties.value = 1.573kmi = km.keymap_items.new('wm.context_scale_float', 'NDOF_BUTTON_MINUS', 'PRESS', shift=True)74kmi.properties.data_path = 'user_preferences.inputs.ndof_sensitivity'75kmi.properties.value = 1.0 / 1.576kmi = km.keymap_items.new('info.reports_display_update', 'TIMER_REPORT', 'ANY', any=True)77# Map Screen78km = kc.keymaps.new('Screen', space_type='EMPTY', region_type='WINDOW', modal=False)79kmi = km.keymap_items.new('screen.animation_step', 'TIMER0', 'ANY', any=True)80kmi = km.keymap_items.new('screen.region_blend', 'TIMERREGION', 'ANY', any=True)81kmi = km.keymap_items.new('screen.screen_set', 'RIGHT_ARROW', 'PRESS', ctrl=True)82kmi.properties.delta = 183kmi = km.keymap_items.new('screen.screen_set', 'LEFT_ARROW', 'PRESS', ctrl=True)84kmi.properties.delta = -185kmi = km.keymap_items.new('screen.screen_full_area', 'UP_ARROW', 'PRESS', ctrl=True)86kmi = km.keymap_items.new('screen.screen_full_area', 'DOWN_ARROW', 'PRESS', ctrl=True)87kmi = km.keymap_items.new('screen.screen_full_area', 'SPACE', 'PRESS', shift=True)88kmi = km.keymap_items.new('screen.screenshot', 'F3', 'PRESS', ctrl=True)89kmi = km.keymap_items.new('screen.screencast', 'F3', 'PRESS', alt=True)90kmi = km.keymap_items.new('screen.region_quadview', 'W', 'PRESS', alt=True)91kmi = km.keymap_items.new('screen.repeat_history', 'F3', 'PRESS', shift=True)92kmi = km.keymap_items.new('screen.repeat_last', 'R', 'PRESS', shift=True)93kmi = km.keymap_items.new('screen.region_flip', 'F5', 'PRESS')94kmi = km.keymap_items.new('screen.redo_last', 'F6', 'PRESS')95kmi = km.keymap_items.new('script.reload', 'F8', 'PRESS')96kmi = km.keymap_items.new('file.execute', 'RET', 'PRESS')97kmi = km.keymap_items.new('file.execute', 'NUMPAD_ENTER', 'PRESS')98kmi = km.keymap_items.new('file.cancel', 'ESC', 'PRESS')99kmi = km.keymap_items.new('ed.undo', 'Z', 'PRESS', ctrl=True)100kmi = km.keymap_items.new('ed.redo', 'Z', 'PRESS', shift=True, ctrl=True)101kmi = km.keymap_items.new('ed.undo_history', 'Z', 'PRESS', ctrl=True, alt=True)102kmi = km.keymap_items.new('render.render', 'F10', 'PRESS')103kmi = km.keymap_items.new('render.render', 'F10', 'PRESS', ctrl=True)104kmi.properties.animation = True105kmi = km.keymap_items.new('render.view_cancel', 'ESC', 'PRESS')106kmi = km.keymap_items.new('render.view_show', 'F11', 'PRESS')107kmi = km.keymap_items.new('render.play_rendered_anim', 'F11', 'PRESS', ctrl=True)108kmi = km.keymap_items.new('screen.userpref_show', 'U', 'PRESS', ctrl=True, alt=True)109# Map Markers110km = kc.keymaps.new('Markers', space_type='EMPTY', region_type='WINDOW', modal=False)111kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')112kmi = km.keymap_items.new('marker.move', 'EVT_TWEAK_S', 'ANY')113kmi = km.keymap_items.new('marker.duplicate', 'D', 'PRESS', shift=True)114kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS')115kmi.properties.extend = False116kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True)117kmi.properties.extend = True118kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', ctrl=True)119kmi.properties.extend = False120kmi.properties.camera = True121kmi = km.keymap_items.new('marker.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)122kmi.properties.extend = True123kmi.properties.camera = True124kmi = km.keymap_items.new('marker.select_border', 'B', 'PRESS')125kmi = km.keymap_items.new('marker.select_all', 'A', 'PRESS', ctrl=True)126kmi = km.keymap_items.new('marker.delete', 'X', 'PRESS')127kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)128kmi = km.keymap_items.new('marker.move', 'G', 'PRESS')129kmi = km.keymap_items.new('marker.camera_bind', 'B', 'PRESS', ctrl=True)130# Map Outliner131km = kc.keymaps.new('Outliner', space_type='OUTLINER', region_type='WINDOW', modal=False)132kmi = km.keymap_items.new('outliner.item_rename', 'LEFTMOUSE', 'DOUBLE_CLICK')133kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK')134kmi.properties.extend = False135kmi.properties.recursive = False136kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', shift=True)137kmi.properties.extend = True138kmi.properties.recursive = False139kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', ctrl=True)140kmi.properties.extend = False141kmi.properties.recursive = True142kmi = km.keymap_items.new('outliner.item_activate', 'LEFTMOUSE', 'CLICK', shift=True, ctrl=True)143kmi.properties.extend = True144kmi.properties.recursive = True145kmi = km.keymap_items.new('outliner.select_border', 'B', 'PRESS')146kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS')147kmi.properties.all = False148kmi = km.keymap_items.new('outliner.item_openclose', 'RET', 'PRESS', shift=True)149kmi.properties.all = True150kmi = km.keymap_items.new('outliner.item_rename', 'LEFTMOUSE', 'PRESS', ctrl=True)151kmi = km.keymap_items.new('outliner.operation', 'RIGHTMOUSE', 'PRESS')152kmi = km.keymap_items.new('outliner.show_hierarchy', 'HOME', 'PRESS')153kmi = km.keymap_items.new('outliner.show_active', 'PERIOD', 'PRESS')154kmi = km.keymap_items.new('outliner.show_active', 'NUMPAD_PERIOD', 'PRESS')155kmi = km.keymap_items.new('outliner.scroll_page', 'PAGE_DOWN', 'PRESS')156kmi = km.keymap_items.new('outliner.scroll_page', 'PAGE_UP', 'PRESS')157kmi.properties.up = True158kmi = km.keymap_items.new('outliner.show_one_level', 'NUMPAD_PLUS', 'PRESS')159kmi = km.keymap_items.new('outliner.show_one_level', 'NUMPAD_MINUS', 'PRESS')160kmi.properties.open = False161kmi = km.keymap_items.new('outliner.selected_toggle', 'A', 'PRESS', ctrl=True)162kmi = km.keymap_items.new('outliner.expanded_toggle', 'A', 'PRESS', shift=True)163kmi = km.keymap_items.new('outliner.renderability_toggle', 'R', 'PRESS')164kmi = km.keymap_items.new('outliner.selectability_toggle', 'S', 'PRESS')165kmi = km.keymap_items.new('outliner.visibility_toggle', 'V', 'PRESS')166kmi = km.keymap_items.new('outliner.keyingset_add_selected', 'K', 'PRESS')167kmi = km.keymap_items.new('outliner.keyingset_remove_selected', 'K', 'PRESS', alt=True)168kmi = km.keymap_items.new('anim.keyframe_insert', 'I', 'PRESS')169kmi = km.keymap_items.new('anim.keyframe_delete', 'I', 'PRESS', alt=True)170kmi = km.keymap_items.new('outliner.drivers_add_selected', 'D', 'PRESS')171kmi = km.keymap_items.new('outliner.drivers_delete_selected', 'D', 'PRESS', alt=True)172# Map 3D View Generic173km = kc.keymaps.new('3D View Generic', space_type='VIEW_3D', region_type='WINDOW', modal=False)174kmi = km.keymap_items.new('view3d.properties', 'F12', 'PRESS')175kmi = km.keymap_items.new('view3d.toolshelf', 'D', 'PRESS')176# Map Face Mask177km = kc.keymaps.new('Face Mask', space_type='EMPTY', region_type='WINDOW', modal=False)178kmi = km.keymap_items.new('paint.face_select_all', 'A', 'PRESS', ctrl=True)179kmi = km.keymap_items.new('paint.face_select_all', 'I', 'PRESS', ctrl=True)180kmi.properties.action = 'INVERT'181kmi = km.keymap_items.new('paint.face_select_hide', 'H', 'PRESS')182kmi.properties.unselected = False183kmi = km.keymap_items.new('paint.face_select_hide', 'H', 'PRESS', shift=True)184kmi.properties.unselected = True185kmi = km.keymap_items.new('paint.face_select_reveal', 'H', 'PRESS', alt=True)186kmi = km.keymap_items.new('paint.face_select_linked', 'L', 'PRESS', ctrl=True)187kmi = km.keymap_items.new('paint.face_select_linked_pick', 'L', 'PRESS')188# Map Weight Paint Vertex Selection189km = kc.keymaps.new('Weight Paint Vertex Selection', space_type='EMPTY', region_type='WINDOW', modal=False)190kmi = km.keymap_items.new('paint.vert_select_all', 'A', 'PRESS', ctrl=True)191kmi.properties.action = 'SELECT'192kmi = km.keymap_items.new('paint.vert_select_all', 'I', 'PRESS', ctrl=True)193kmi.properties.action = 'INVERT'194kmi = km.keymap_items.new('view3d.select_border', 'B', 'PRESS')195kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)196kmi.properties.deselect = False197kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)198kmi.properties.deselect = True199kmi = km.keymap_items.new('view3d.select_circle', 'C', 'PRESS', alt=True)200# Map Pose201km = kc.keymaps.new('Pose', space_type='EMPTY', region_type='WINDOW', modal=False)202kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS', ctrl=True)203kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)204kmi.properties.name = 'INFO_MT_add'205kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS')206kmi.properties.unselected = False207kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS', shift=True)208kmi.properties.unselected = True209kmi = km.keymap_items.new('pose.reveal', 'H', 'PRESS', alt=True)210kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True, ctrl=True)211kmi.properties.name = 'VIEW3D_MT_pose_apply'212kmi = km.keymap_items.new('pose.rot_clear', 'R', 'PRESS', alt=True)213kmi = km.keymap_items.new('pose.loc_clear', 'G', 'PRESS', alt=True)214kmi = km.keymap_items.new('pose.scale_clear', 'S', 'PRESS', alt=True)215kmi = km.keymap_items.new('pose.quaternions_flip', 'F', 'PRESS', alt=True)216kmi = km.keymap_items.new('pose.rotation_mode_set', 'R', 'PRESS', ctrl=True)217kmi = km.keymap_items.new('pose.copy', 'C', 'PRESS', ctrl=True)218kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', ctrl=True)219kmi.properties.flipped = False220kmi = km.keymap_items.new('pose.paste', 'V', 'PRESS', shift=True, ctrl=True)221kmi.properties.flipped = True222kmi = km.keymap_items.new('pose.select_all', 'LEFTMOUSE', 'CLICK')223kmi.properties.action = 'TOGGLE'224kmi = km.keymap_items.new('pose.select_all', 'I', 'PRESS', ctrl=True)225kmi.properties.action = 'INVERT'226kmi = km.keymap_items.new('pose.select_parent', 'P', 'PRESS', shift=True)227kmi = km.keymap_items.new('pose.select_hierarchy', 'LEFT_BRACKET', 'PRESS')228kmi.properties.direction = 'PARENT'229kmi.properties.extend = False230kmi = km.keymap_items.new('pose.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)231kmi.properties.direction = 'PARENT'232kmi.properties.extend = True233kmi = km.keymap_items.new('pose.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')234kmi.properties.direction = 'CHILD'235kmi.properties.extend = False236kmi = km.keymap_items.new('pose.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)237kmi.properties.direction = 'CHILD'238kmi.properties.extend = True239kmi = km.keymap_items.new('pose.select_linked', 'L', 'PRESS', alt=True)240kmi = km.keymap_items.new('pose.select_grouped', 'G', 'PRESS', shift=True)241kmi = km.keymap_items.new('pose.select_mirror', 'F', 'PRESS', shift=True)242kmi.properties.only_active = True243kmi = km.keymap_items.new('pose.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)244kmi = km.keymap_items.new('pose.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)245kmi = km.keymap_items.new('pose.ik_add', 'I', 'PRESS', shift=True)246kmi = km.keymap_items.new('pose.ik_clear', 'I', 'PRESS', ctrl=True, alt=True)247kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', ctrl=True)248kmi.properties.name = 'VIEW3D_MT_pose_group'249kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True)250kmi.properties.name = 'VIEW3D_MT_bone_options_toggle'251kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True, ctrl=True)252kmi.properties.name = 'VIEW3D_MT_bone_options_enable'253kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', alt=True)254kmi.properties.name = 'VIEW3D_MT_bone_options_disable'255kmi = km.keymap_items.new('armature.layers_show_all', 'ACCENT_GRAVE', 'PRESS', ctrl=True)256kmi = km.keymap_items.new('armature.armature_layers', 'M', 'PRESS', shift=True)257kmi = km.keymap_items.new('pose.bone_layers', 'M', 'PRESS')258kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS', ctrl=True, alt=True)259kmi.properties.mode = 'BONE_SIZE'260kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'I', 'PRESS')261kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)262kmi = km.keymap_items.new('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)263kmi = km.keymap_items.new('poselib.browse_interactive', 'L', 'PRESS', ctrl=True)264kmi = km.keymap_items.new('poselib.pose_add', 'L', 'PRESS', shift=True)265kmi = km.keymap_items.new('poselib.pose_remove', 'L', 'PRESS', ctrl=True, alt=True)266kmi = km.keymap_items.new('poselib.pose_rename', 'L', 'PRESS', shift=True, ctrl=True)267kmi = km.keymap_items.new('pose.push', 'E', 'PRESS', ctrl=True)268kmi = km.keymap_items.new('pose.relax', 'E', 'PRESS', alt=True)269kmi = km.keymap_items.new('pose.breakdown', 'E', 'PRESS', shift=True)270kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS')271kmi.properties.name = 'VIEW3D_MT_pose_specials'272# Map Object Mode273km = kc.keymaps.new('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)274kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)275kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'276kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS')277kmi.properties.data_path = 'tool_settings.use_proportional_edit_objects'278kmi = km.keymap_items.new('view3d.game_start', 'P', 'PRESS', shift=True, ctrl=True, alt=True)279kmi = km.keymap_items.new('object.select_all', 'A', 'PRESS', ctrl=True)280kmi.properties.action = 'INVERT'281kmi = km.keymap_items.new('object.select_linked', 'L', 'PRESS', shift=True)282kmi = km.keymap_items.new('object.select_grouped', 'G', 'PRESS', shift=True)283kmi = km.keymap_items.new('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)284kmi = km.keymap_items.new('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS')285kmi.properties.direction = 'PARENT'286kmi.properties.extend = False287kmi = km.keymap_items.new('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)288kmi.properties.direction = 'PARENT'289kmi.properties.extend = True290kmi = km.keymap_items.new('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')291kmi.properties.direction = 'CHILD'292kmi.properties.extend = False293kmi = km.keymap_items.new('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)294kmi.properties.direction = 'CHILD'295kmi.properties.extend = True296kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS', ctrl=True)297kmi = km.keymap_items.new('object.parent_no_inverse_set', 'P', 'PRESS', shift=True, ctrl=True)298kmi = km.keymap_items.new('object.parent_clear', 'P', 'PRESS', alt=True)299kmi = km.keymap_items.new('object.track_set', 'T', 'PRESS', ctrl=True)300kmi = km.keymap_items.new('object.track_clear', 'T', 'PRESS', alt=True)301kmi = km.keymap_items.new('object.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)302kmi = km.keymap_items.new('object.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)303kmi = km.keymap_items.new('object.location_clear', 'G', 'PRESS', alt=True)304kmi = km.keymap_items.new('object.rotation_clear', 'R', 'PRESS', alt=True)305kmi = km.keymap_items.new('object.scale_clear', 'S', 'PRESS', alt=True)306kmi = km.keymap_items.new('object.origin_clear', 'O', 'PRESS', alt=True)307kmi = km.keymap_items.new('object.hide_view_clear', 'H', 'PRESS', alt=True)308kmi = km.keymap_items.new('object.hide_view_set', 'H', 'PRESS')309kmi.properties.unselected = False310kmi = km.keymap_items.new('object.hide_view_set', 'H', 'PRESS', shift=True)311kmi.properties.unselected = True312kmi = km.keymap_items.new('object.hide_render_clear', 'H', 'PRESS', ctrl=True, alt=True)313kmi = km.keymap_items.new('object.hide_render_set', 'H', 'PRESS', ctrl=True)314kmi = km.keymap_items.new('object.move_to_layer', 'M', 'PRESS')315kmi = km.keymap_items.new('object.delete', 'X', 'PRESS')316kmi.properties.use_global = False317kmi = km.keymap_items.new('object.delete', 'X', 'PRESS', shift=True)318kmi.properties.use_global = False319kmi = km.keymap_items.new('object.delete', 'DEL', 'PRESS')320kmi = km.keymap_items.new('object.delete', 'DEL', 'PRESS', shift=True)321kmi.properties.use_global = True322kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)323kmi.properties.name = 'INFO_MT_add'324kmi = km.keymap_items.new('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True)325kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True, ctrl=True)326kmi.properties.name = 'VIEW3D_MT_object_apply'327kmi = km.keymap_items.new('wm.call_menu', 'U', 'PRESS')328kmi.properties.name = 'VIEW3D_MT_make_single_user'329kmi = km.keymap_items.new('wm.call_menu', 'L', 'PRESS', ctrl=True)330kmi.properties.name = 'VIEW3D_MT_make_links'331kmi = km.keymap_items.new('object.duplicate_move', 'D', 'PRESS', shift=True)332kmi = km.keymap_items.new('object.duplicate_move_linked', 'D', 'PRESS', alt=True)333kmi = km.keymap_items.new('object.join', 'J', 'PRESS', ctrl=True)334kmi = km.keymap_items.new('object.convert', 'C', 'PRESS', ctrl=True, alt=True)335kmi = km.keymap_items.new('object.proxy_make', 'P', 'PRESS', ctrl=True, alt=True)336kmi = km.keymap_items.new('object.make_local', 'L', 'PRESS', alt=True)337kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'I', 'PRESS')338kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)339kmi = km.keymap_items.new('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)340kmi = km.keymap_items.new('group.create', 'G', 'PRESS', ctrl=True)341kmi = km.keymap_items.new('group.objects_remove', 'G', 'PRESS', ctrl=True, alt=True)342kmi = km.keymap_items.new('group.objects_remove_all', 'G', 'PRESS', shift=True, ctrl=True, alt=True)343kmi = km.keymap_items.new('group.objects_add_active', 'G', 'PRESS', shift=True, ctrl=True)344kmi = km.keymap_items.new('group.objects_remove_active', 'G', 'PRESS', shift=True, alt=True)345kmi = km.keymap_items.new('rigidbody.objects_add', 'R', 'PRESS', ctrl=True)346kmi.properties.type = 'ACTIVE'347kmi = km.keymap_items.new('rigidbody.objects_add', 'R', 'PRESS', shift=True, ctrl=True)348kmi.properties.type = 'PASSIVE'349kmi = km.keymap_items.new('rigidbody.objects_remove', 'R', 'PRESS', ctrl=True, alt=True)350kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS')351kmi.properties.name = 'VIEW3D_MT_object_specials'352kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)353kmi.properties.level = 0354kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)355kmi.properties.level = 1356kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)357kmi.properties.level = 2358kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)359kmi.properties.level = 3360kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)361kmi.properties.level = 4362kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)363kmi.properties.level = 5364# Map Particle365km = kc.keymaps.new('Particle', space_type='EMPTY', region_type='WINDOW', modal=False)366kmi = km.keymap_items.new('particle.select_all', 'A', 'PRESS', ctrl=True)367kmi.properties.action = 'TOGGLE'368kmi = km.keymap_items.new('particle.select_all', 'I', 'PRESS', ctrl=True)369kmi.properties.action = 'INVERT'370kmi = km.keymap_items.new('particle.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)371kmi = km.keymap_items.new('particle.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)372kmi = km.keymap_items.new('particle.select_linked', 'L', 'PRESS')373kmi.properties.deselect = False374kmi = km.keymap_items.new('particle.select_linked', 'L', 'PRESS', shift=True)375kmi.properties.deselect = True376kmi = km.keymap_items.new('particle.delete', 'X', 'PRESS')377kmi = km.keymap_items.new('particle.delete', 'DEL', 'PRESS')378kmi = km.keymap_items.new('particle.reveal', 'H', 'PRESS', alt=True)379kmi = km.keymap_items.new('particle.hide', 'H', 'PRESS')380kmi.properties.unselected = False381kmi = km.keymap_items.new('particle.hide', 'H', 'PRESS', shift=True)382kmi.properties.unselected = True383kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)384kmi.properties.release_confirm = True385kmi.properties.use_planar_constraint= True386kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)387kmi.properties.release_confirm = True388kmi.properties.use_accurate= True389kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)390kmi.properties.release_confirm = True391kmi = km.keymap_items.new('particle.brush_edit', 'LEFTMOUSE', 'PRESS')392kmi = km.keymap_items.new('particle.brush_edit', 'LEFTMOUSE', 'PRESS', shift=True)393kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', ctrl=True)394kmi.properties.data_path_primary = 'tool_settings.particle_edit.brush.size'395kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', shift=True)396kmi.properties.data_path_primary = 'tool_settings.particle_edit.brush.strength'397kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS')398kmi.properties.name = 'VIEW3D_MT_particle_specials'399kmi = km.keymap_items.new('particle.weight_set', 'K', 'PRESS', shift=True)400kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)401kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'402kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')403kmi.properties.data_path = 'tool_settings.proportional_edit'404kmi.properties.value_1 = 'DISABLED'405kmi.properties.value_2 = 'ENABLED'406# Map 3D View407km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)408kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)409kmi.properties.release_confirm = True410kmi.properties.use_planar_constraint= True411kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', shift=True)412kmi.properties.release_confirm = True413kmi.properties.use_accurate= True414kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)415kmi.properties.release_confirm = True416kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')417kmi = km.keymap_items.new('view3d.rotate', 'MIDDLEMOUSE', 'PRESS', alt=True)418kmi = km.keymap_items.new('view3d.move', 'MIDDLEMOUSE', 'PRESS')419kmi = km.keymap_items.new('view3d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)420kmi = km.keymap_items.new('view3d.dolly', 'MIDDLEMOUSE', 'PRESS', shift=True, ctrl=True)421kmi = km.keymap_items.new('view3d.view_selected', 'NUMPAD_PERIOD', 'PRESS', ctrl=True)422kmi.properties.use_all_regions = True423kmi = km.keymap_items.new('view3d.view_selected', 'Z', 'PRESS')424kmi.properties.use_all_regions = False425kmi = km.keymap_items.new('view3d.view_lock_to_active', 'NUMPAD_PERIOD', 'PRESS', shift=True)426kmi = km.keymap_items.new('view3d.view_lock_clear', 'NUMPAD_PERIOD', 'PRESS', alt=True)427kmi = km.keymap_items.new('view3d.fly', 'F', 'PRESS', shift=True)428kmi = km.keymap_items.new('view3d.smoothview', 'TIMER1', 'ANY', any=True)429kmi = km.keymap_items.new('view3d.rotate', 'TRACKPADPAN', 'ANY')430kmi = km.keymap_items.new('view3d.rotate', 'MOUSEROTATE', 'ANY')431kmi = km.keymap_items.new('view3d.move', 'TRACKPADPAN', 'ANY', shift=True)432kmi = km.keymap_items.new('view3d.zoom', 'TRACKPADZOOM', 'ANY')433kmi = km.keymap_items.new('view3d.zoom', 'TRACKPADPAN', 'ANY', ctrl=True)434kmi = km.keymap_items.new('view3d.zoom', 'NUMPAD_PLUS', 'PRESS')435kmi.properties.delta = 1436kmi = km.keymap_items.new('view3d.zoom', 'NUMPAD_MINUS', 'PRESS')437kmi.properties.delta = -1438kmi = km.keymap_items.new('view3d.zoom', 'EQUAL', 'PRESS', ctrl=True)439kmi.properties.delta = 1440kmi = km.keymap_items.new('view3d.zoom', 'MINUS', 'PRESS', ctrl=True)441kmi.properties.delta = -1442kmi = km.keymap_items.new('view3d.zoom', 'WHEELINMOUSE', 'PRESS')443kmi.properties.delta = 1444kmi = km.keymap_items.new('view3d.zoom', 'WHEELOUTMOUSE', 'PRESS')445kmi.properties.delta = -1446kmi = km.keymap_items.new('view3d.zoom_camera_1_to_1', 'NUMPAD_ENTER', 'PRESS', shift=True)447kmi = km.keymap_items.new('view3d.view_center_camera', 'HOME', 'PRESS')448kmi = km.keymap_items.new('view3d.view_center_cursor', 'HOME', 'PRESS', alt=True)449kmi = km.keymap_items.new('view3d.view_all', 'HOME', 'PRESS')450kmi.properties.center = False451kmi = km.keymap_items.new('view3d.view_all', 'HOME', 'PRESS', ctrl=True)452kmi.properties.use_all_regions = True453kmi.properties.center = False454kmi = km.keymap_items.new('view3d.view_all', 'C', 'PRESS', shift=True)455kmi.properties.center = True456kmi = km.keymap_items.new('view3d.viewnumpad', 'C', 'PRESS')457kmi.properties.type = 'CAMERA'458kmi = km.keymap_items.new('view3d.viewnumpad', 'F', 'PRESS')459kmi.properties.type = 'FRONT'460kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_2', 'PRESS')461kmi.properties.type = 'ORBITDOWN'462kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'PRESS')463kmi.properties.type = 'RIGHT'464kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_4', 'PRESS')465kmi.properties.type = 'ORBITLEFT'466kmi = km.keymap_items.new('view3d.view_persportho', 'P', 'PRESS')467kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_6', 'PRESS')468kmi.properties.type = 'ORBITRIGHT'469kmi = km.keymap_items.new('view3d.viewnumpad', 'T', 'PRESS')470kmi.properties.type = 'TOP'471kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_8', 'PRESS')472kmi.properties.type = 'ORBITUP'473kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', ctrl=True)474kmi.properties.type = 'BACK'475kmi = km.keymap_items.new('view3d.viewnumpad', 'L', 'PRESS')476kmi.properties.type = 'LEFT'477kmi = km.keymap_items.new('view3d.viewnumpad', 'B', 'PRESS')478kmi.properties.type = 'BOTTOM'479kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_2', 'PRESS', ctrl=True)480kmi.properties.type = 'PANDOWN'481kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_4', 'PRESS', ctrl=True)482kmi.properties.type = 'PANLEFT'483kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_6', 'PRESS', ctrl=True)484kmi.properties.type = 'PANRIGHT'485kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_8', 'PRESS', ctrl=True)486kmi.properties.type = 'PANUP'487kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', ctrl=True)488kmi.properties.type = 'PANRIGHT'489kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)490kmi.properties.type = 'PANLEFT'491kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', shift=True)492kmi.properties.type = 'PANUP'493kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', shift=True)494kmi.properties.type = 'PANDOWN'495kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', ctrl=True, alt=True)496kmi.properties.type = 'ORBITLEFT'497kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True, alt=True)498kmi.properties.type = 'ORBITRIGHT'499kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', shift=True, alt=True)500kmi.properties.type = 'ORBITUP'501kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', shift=True, alt=True)502kmi.properties.type = 'ORBITDOWN'503kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', shift=True)504kmi.properties.type = 'FRONT'505kmi.properties.align_active = True506kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', shift=True)507kmi.properties.type = 'RIGHT'508kmi.properties.align_active = True509kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', shift=True)510kmi.properties.type = 'TOP'511kmi.properties.align_active = True512kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', shift=True, ctrl=True)513kmi.properties.type = 'BACK'514kmi.properties.align_active = True515kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', shift=True, ctrl=True)516kmi.properties.type = 'LEFT'517kmi.properties.align_active = True518kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', shift=True, ctrl=True)519kmi.properties.type = 'BOTTOM'520kmi.properties.align_active = True521kmi = km.keymap_items.new('view3d.localview', 'NUMPAD_SLASH', 'PRESS')522kmi = km.keymap_items.new('view3d.ndof_orbit_zoom', 'NDOF_MOTION', 'ANY')523kmi = km.keymap_items.new('view3d.ndof_orbit', 'NDOF_MOTION', 'ANY', ctrl=True)524kmi = km.keymap_items.new('view3d.ndof_pan', 'NDOF_MOTION', 'ANY', shift=True)525kmi = km.keymap_items.new('view3d.ndof_all', 'NDOF_MOTION', 'ANY', shift=True, ctrl=True)526kmi = km.keymap_items.new('view3d.view_selected', 'NDOF_BUTTON_FIT', 'PRESS')527kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_FRONT', 'PRESS')528kmi.properties.type = 'FRONT'529kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_BACK', 'PRESS')530kmi.properties.type = 'BACK'531kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_LEFT', 'PRESS')532kmi.properties.type = 'LEFT'533kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_RIGHT', 'PRESS')534kmi.properties.type = 'RIGHT'535kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_TOP', 'PRESS')536kmi.properties.type = 'TOP'537kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_BOTTOM', 'PRESS')538kmi.properties.type = 'BOTTOM'539kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_FRONT', 'PRESS', shift=True)540kmi.properties.type = 'FRONT'541kmi.properties.align_active = True542kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_RIGHT', 'PRESS', shift=True)543kmi.properties.type = 'RIGHT'544kmi.properties.align_active = True545kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_TOP', 'PRESS', shift=True)546kmi.properties.type = 'TOP'547kmi.properties.align_active = True548kmi = km.keymap_items.new('view3d.layers', 'ACCENT_GRAVE', 'PRESS')549kmi.properties.nr = 0550kmi = km.keymap_items.new('view3d.layers', 'ONE', 'PRESS', any=True)551kmi.properties.nr = 1552kmi = km.keymap_items.new('view3d.layers', 'TWO', 'PRESS', any=True)553kmi.properties.nr = 2554kmi = km.keymap_items.new('view3d.layers', 'THREE', 'PRESS', any=True)555kmi.properties.nr = 3556kmi = km.keymap_items.new('view3d.layers', 'FOUR', 'PRESS', any=True)557kmi.properties.nr = 4558kmi = km.keymap_items.new('view3d.layers', 'FIVE', 'PRESS', any=True)559kmi.properties.nr = 5560kmi = km.keymap_items.new('view3d.layers', 'SIX', 'PRESS', any=True)561kmi.properties.nr = 6562kmi = km.keymap_items.new('view3d.layers', 'SEVEN', 'PRESS', any=True)563kmi.properties.nr = 7564kmi = km.keymap_items.new('view3d.layers', 'EIGHT', 'PRESS', any=True)565kmi.properties.nr = 8566kmi = km.keymap_items.new('view3d.layers', 'NINE', 'PRESS', any=True)567kmi.properties.nr = 9568kmi = km.keymap_items.new('view3d.layers', 'ZERO', 'PRESS', any=True)569kmi.properties.nr = 10570kmi = km.keymap_items.new('wm.context_toggle_enum', 'F3', 'PRESS')571kmi.properties.data_path = 'space_data.viewport_shade'572kmi.properties.value_1 = 'SOLID'573kmi.properties.value_2 = 'WIREFRAME'574kmi = km.keymap_items.new('wm.context_toggle_enum', 'Z', 'PRESS', alt=True)575kmi.properties.data_path = 'space_data.viewport_shade'576kmi.properties.value_1 = 'SOLID'577kmi.properties.value_2 = 'TEXTURED'578kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK')579kmi.properties.extend = False580kmi.properties.deselect = False581kmi.properties.toggle = False582kmi.properties.center = False583kmi.properties.enumerate = False584kmi.properties.object = False585kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', ctrl=True)586kmi.properties.extend = False587kmi.properties.deselect = False588kmi.properties.toggle = True589kmi.properties.center = False590kmi.properties.enumerate = False591kmi.properties.object = False592kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True)593kmi.properties.extend = False594kmi.properties.deselect = False595kmi.properties.toggle = False596kmi.properties.center = True597kmi.properties.enumerate = False598kmi.properties.object = True599kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', alt=True)600kmi.properties.extend = False601kmi.properties.deselect = False602kmi.properties.toggle = False603kmi.properties.center = False604kmi.properties.enumerate = True605kmi.properties.object = False606kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, ctrl=True)607kmi.properties.extend = True608kmi.properties.deselect = False609kmi.properties.toggle = True610kmi.properties.center = True611kmi.properties.enumerate = False612kmi.properties.object = False613kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', ctrl=True, alt=True)614kmi.properties.extend = False615kmi.properties.deselect = False616kmi.properties.toggle = False617kmi.properties.center = True618kmi.properties.enumerate = True619kmi.properties.object = False620kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, alt=True)621kmi.properties.extend = False622kmi.properties.deselect = False623kmi.properties.toggle = True624kmi.properties.center = False625kmi.properties.enumerate = True626kmi.properties.object = False627kmi = km.keymap_items.new('view3d.select_or_deselect_all', 'SELECTMOUSE', 'CLICK', shift=True, ctrl=True, alt=True)628kmi.properties.extend = False629kmi.properties.deselect = False630kmi.properties.toggle = True631kmi.properties.center = True632kmi.properties.enumerate = True633kmi.properties.object = False634kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_L', 'ANY')635kmi.properties.extend = False636kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)637kmi.properties.deselect = False638kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)639kmi.properties.deselect = True640kmi = km.keymap_items.new('view3d.select_circle', 'C', 'PRESS', alt=True)641kmi = km.keymap_items.new('view3d.clip_border', 'B', 'PRESS', alt=True)642kmi = km.keymap_items.new('view3d.zoom_border', 'B', 'PRESS', shift=True)643kmi = km.keymap_items.new('view3d.render_border', 'B', 'PRESS', shift=True)644kmi.properties.camera_only = True645kmi = km.keymap_items.new('view3d.render_border', 'B', 'PRESS', ctrl=True)646kmi.properties.camera_only = False647kmi = km.keymap_items.new('view3d.clear_render_border', 'B', 'PRESS', ctrl=True, alt=True)648kmi = km.keymap_items.new('view3d.camera_to_view', 'NUMPAD_0', 'PRESS', ctrl=True, alt=True)649kmi = km.keymap_items.new('view3d.object_as_camera', 'NUMPAD_0', 'PRESS', ctrl=True)650kmi = km.keymap_items.new('wm.call_menu', 'S', 'PRESS', shift=True)651kmi.properties.name = 'VIEW3D_MT_snap'652kmi = km.keymap_items.new('view3d.copybuffer', 'C', 'PRESS', ctrl=True)653kmi = km.keymap_items.new('view3d.pastebuffer', 'V', 'PRESS', ctrl=True)654kmi = km.keymap_items.new('wm.context_set_enum', 'COMMA', 'PRESS')655kmi.properties.data_path = 'space_data.pivot_point'656kmi.properties.value = 'BOUNDING_BOX_CENTER'657kmi = km.keymap_items.new('wm.context_set_enum', 'COMMA', 'PRESS', ctrl=True)658kmi.properties.data_path = 'space_data.pivot_point'659kmi.properties.value = 'MEDIAN_POINT'660kmi = km.keymap_items.new('wm.context_toggle', 'COMMA', 'PRESS', alt=True)661kmi.properties.data_path = 'space_data.use_pivot_point_align'662kmi = km.keymap_items.new('wm.context_toggle', 'SPACE', 'PRESS', ctrl=True)663kmi.properties.data_path = 'space_data.show_manipulator'664kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'PRESS')665kmi.properties.data_path = 'space_data.pivot_point'666kmi.properties.value = 'CURSOR'667kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'PRESS', ctrl=True)668kmi.properties.data_path = 'space_data.pivot_point'669kmi.properties.value = 'INDIVIDUAL_ORIGINS'670kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'PRESS', alt=True)671kmi.properties.data_path = 'space_data.pivot_point'672kmi.properties.value = 'ACTIVE_ELEMENT'673kmi = km.keymap_items.new('transform.translate', 'W', 'PRESS', shift=True)674kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')675kmi = km.keymap_items.new('transform.rotate', 'E', 'PRESS', shift=True)676kmi = km.keymap_items.new('transform.resize', 'R', 'PRESS', shift=True)677kmi = km.keymap_items.new('transform.bend', 'Q', 'PRESS', shift=True)678kmi = km.keymap_items.new('transform.tosphere', 'S', 'PRESS', shift=True, alt=True)679kmi = km.keymap_items.new('transform.shear', 'S', 'PRESS', shift=True, ctrl=True, alt=True)680kmi = km.keymap_items.new('transform.select_orientation', 'SPACE', 'PRESS', alt=True)681kmi = km.keymap_items.new('transform.create_orientation', 'SPACE', 'PRESS', ctrl=True, alt=True)682kmi.properties.use = True683kmi = km.keymap_items.new('transform.mirror', 'M', 'PRESS', ctrl=True)684kmi = km.keymap_items.new('wm.context_toggle', 'TAB', 'PRESS', shift=True)685kmi.properties.data_path = 'tool_settings.use_snap'686kmi = km.keymap_items.new('wm.context_menu_enum', 'TAB', 'PRESS', shift=True, ctrl=True)687kmi.properties.data_path = 'tool_settings.snap_element'688kmi = km.keymap_items.new('transform.translate', 'T', 'PRESS', shift=True)689kmi.properties.texture_space = True690kmi = km.keymap_items.new('transform.resize', 'T', 'PRESS', shift=True, alt=True)691kmi.properties.texture_space = True692kmi = km.keymap_items.new('transform.skin_resize', 'A', 'PRESS', shift=True, ctrl=True)693kmi = km.keymap_items.new('view3d.enable_manipulator', 'W', 'PRESS')694kmi.properties.translate = True695kmi = km.keymap_items.new('view3d.enable_manipulator', 'E', 'PRESS')696kmi.properties.rotate = True697kmi = km.keymap_items.new('view3d.enable_manipulator', 'R', 'PRESS')698kmi.properties.scale = True699kmi = km.keymap_items.new('wm.context_toggle', 'S', 'PRESS')700kmi.properties.data_path = 'tool_settings.use_snap'701kmi = km.keymap_items.new('wm.context_toggle_enum', 'A', 'PRESS')702kmi.properties.data_path = 'tool_settings.snap_element'703kmi.properties.value_1 = 'VERTEX'704kmi.properties.value_2 = 'INCREMENT'705kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_L', 'ANY', ctrl=True)706kmi = km.keymap_items.new('wm.context_toggle', 'G', 'PRESS')707kmi.properties.data_path = 'space_data.show_floor'708# Map Animation Channels709km = kc.keymaps.new('Animation Channels', space_type='EMPTY', region_type='WINDOW', modal=False)710kmi = km.keymap_items.new('anim.channels_click', 'LEFTMOUSE', 'PRESS')711kmi.properties.extend = False712kmi = km.keymap_items.new('anim.channels_click', 'LEFTMOUSE', 'PRESS', shift=True)713kmi.properties.extend = True714kmi = km.keymap_items.new('anim.channels_click', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)715kmi.properties.children_only = True716kmi = km.keymap_items.new('anim.channels_rename', 'LEFTMOUSE', 'PRESS', ctrl=True)717kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'A', 'PRESS', ctrl=True)718kmi = km.keymap_items.new('anim.channels_select_all_toggle', 'I', 'PRESS', ctrl=True)719kmi.properties.invert = True720kmi = km.keymap_items.new('anim.channels_select_border', 'B', 'PRESS')721kmi = km.keymap_items.new('anim.channels_select_border', 'EVT_TWEAK_L', 'ANY')722kmi = km.keymap_items.new('anim.channels_delete', 'X', 'PRESS')723kmi = km.keymap_items.new('anim.channels_delete', 'DEL', 'PRESS')724kmi = km.keymap_items.new('anim.channels_setting_toggle', 'W', 'PRESS', shift=True)725kmi = km.keymap_items.new('anim.channels_setting_enable', 'W', 'PRESS', shift=True, ctrl=True)726kmi = km.keymap_items.new('anim.channels_setting_disable', 'W', 'PRESS', alt=True)727kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')728kmi = km.keymap_items.new('anim.channels_expand', 'NUMPAD_PLUS', 'PRESS')729kmi = km.keymap_items.new('anim.channels_collapse', 'NUMPAD_MINUS', 'PRESS')730kmi = km.keymap_items.new('anim.channels_expand', 'NUMPAD_PLUS', 'PRESS', ctrl=True)731kmi.properties.all = False732kmi = km.keymap_items.new('anim.channels_collapse', 'NUMPAD_MINUS', 'PRESS', ctrl=True)733kmi.properties.all = False734kmi = km.keymap_items.new('anim.channels_move', 'PAGE_UP', 'PRESS')735kmi.properties.direction = 'UP'736kmi = km.keymap_items.new('anim.channels_move', 'PAGE_DOWN', 'PRESS')737kmi.properties.direction = 'DOWN'738kmi = km.keymap_items.new('anim.channels_move', 'PAGE_UP', 'PRESS', shift=True)739kmi.properties.direction = 'TOP'740kmi = km.keymap_items.new('anim.channels_move', 'PAGE_DOWN', 'PRESS', shift=True)741kmi.properties.direction = 'BOTTOM'742kmi = km.keymap_items.new('anim.channels_group', 'G', 'PRESS', ctrl=True)743kmi = km.keymap_items.new('anim.channels_ungroup', 'G', 'PRESS', alt=True)744# Map UV Editor745km = kc.keymaps.new('UV Editor', space_type='EMPTY', region_type='WINDOW', modal=False)746kmi = km.keymap_items.new('wm.context_toggle', 'Q', 'PRESS')747kmi.properties.data_path = 'tool_settings.use_uv_sculpt'748kmi = km.keymap_items.new('uv.mark_seam', 'E', 'PRESS', ctrl=True)749kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'PRESS')750kmi.properties.extend = False751kmi = km.keymap_items.new('uv.select', 'SELECTMOUSE', 'PRESS', shift=True)752kmi.properties.extend = True753kmi = km.keymap_items.new('uv.select_loop', 'SELECTMOUSE', 'PRESS', alt=True)754kmi.properties.extend = False755kmi = km.keymap_items.new('uv.select_loop', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)756kmi.properties.extend = True757kmi = km.keymap_items.new('uv.select_split', 'Y', 'PRESS')758kmi = km.keymap_items.new('uv.select_border', 'B', 'PRESS')759kmi.properties.pinned = False760kmi = km.keymap_items.new('uv.select_border', 'B', 'PRESS', shift=True)761kmi.properties.pinned = True762kmi = km.keymap_items.new('uv.circle_select', 'C', 'PRESS')763kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)764kmi.properties.deselect = False765kmi = km.keymap_items.new('uv.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)766kmi.properties.deselect = True767kmi = km.keymap_items.new('uv.select_linked', 'L', 'PRESS', ctrl=True)768kmi.properties.extend = False769kmi = km.keymap_items.new('uv.select_linked_pick', 'L', 'PRESS')770kmi.properties.extend = False771kmi = km.keymap_items.new('uv.select_linked', 'L', 'PRESS', shift=True, ctrl=True)772kmi.properties.extend = True773kmi = km.keymap_items.new('uv.select_linked_pick', 'L', 'PRESS', shift=True)774kmi.properties.extend = True775kmi = km.keymap_items.new('uv.select_all', 'A', 'PRESS', ctrl=True)776kmi.properties.action = 'TOGGLE'777kmi = km.keymap_items.new('uv.select_all', 'I', 'PRESS', ctrl=True)778kmi.properties.action = 'INVERT'779kmi = km.keymap_items.new('uv.select_pinned', 'P', 'PRESS', shift=True)780kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS')781kmi.properties.name = 'IMAGE_MT_uvs_weldalign'782kmi = km.keymap_items.new('uv.stitch', 'V', 'PRESS')783kmi = km.keymap_items.new('uv.pin', 'P', 'PRESS')784kmi.properties.clear = False785kmi = km.keymap_items.new('uv.pin', 'P', 'PRESS', alt=True)786kmi.properties.clear = True787kmi = km.keymap_items.new('uv.unwrap', 'E', 'PRESS')788kmi = km.keymap_items.new('uv.minimize_stretch', 'V', 'PRESS', ctrl=True)789kmi = km.keymap_items.new('uv.pack_islands', 'P', 'PRESS', ctrl=True)790kmi = km.keymap_items.new('uv.average_islands_scale', 'A', 'PRESS', shift=True, ctrl=True)791kmi = km.keymap_items.new('uv.hide', 'H', 'PRESS')792kmi.properties.unselected = False793kmi = km.keymap_items.new('uv.hide', 'H', 'PRESS', shift=True)794kmi.properties.unselected = True795kmi = km.keymap_items.new('uv.reveal', 'H', 'PRESS', alt=True)796kmi = km.keymap_items.new('uv.cursor_set', 'ACTIONMOUSE', 'PRESS')797kmi = km.keymap_items.new('uv.tile_set', 'ACTIONMOUSE', 'PRESS', shift=True)798kmi = km.keymap_items.new('wm.call_menu', 'S', 'PRESS', shift=True)799kmi.properties.name = 'IMAGE_MT_uvs_snap'800kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)801kmi.properties.name = 'IMAGE_MT_uvs_select_mode'802kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)803kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'804kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')805kmi.properties.data_path = 'tool_settings.proportional_edit'806kmi.properties.value_1 = 'DISABLED'807kmi.properties.value_2 = 'ENABLED'808kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')809kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')810kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')811kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')812kmi = km.keymap_items.new('transform.shear', 'S', 'PRESS', shift=True, ctrl=True, alt=True)813kmi = km.keymap_items.new('transform.mirror', 'M', 'PRESS', ctrl=True)814kmi = km.keymap_items.new('wm.context_toggle', 'TAB', 'PRESS', shift=True)815kmi.properties.data_path = 'tool_settings.use_snap'816kmi = km.keymap_items.new('wm.context_menu_enum', 'TAB', 'PRESS', shift=True, ctrl=True)817kmi.properties.data_path = 'tool_settings.snap_uv_element'818# Map Mask Editing819km = kc.keymaps.new('Mask Editing', space_type='EMPTY', region_type='WINDOW', modal=False)820kmi = km.keymap_items.new('mask.new', 'N', 'PRESS', alt=True)821kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)822kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'823kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS')824kmi.properties.data_path = 'tool_settings.use_proportional_edit_mask'825kmi = km.keymap_items.new('mask.add_vertex_slide', 'ACTIONMOUSE', 'PRESS', ctrl=True)826kmi = km.keymap_items.new('mask.add_feather_vertex_slide', 'ACTIONMOUSE', 'PRESS', shift=True)827kmi = km.keymap_items.new('mask.delete', 'X', 'PRESS')828kmi = km.keymap_items.new('mask.delete', 'DEL', 'PRESS')829kmi = km.keymap_items.new('mask.select', 'SELECTMOUSE', 'PRESS')830kmi.properties.extend = False831kmi.properties.deselect = False832kmi.properties.toggle = False833kmi = km.keymap_items.new('mask.select', 'SELECTMOUSE', 'PRESS', shift=True)834kmi.properties.extend = False835kmi.properties.deselect = False836kmi.properties.toggle = True837kmi = km.keymap_items.new('mask.select_all', 'A', 'PRESS', ctrl=True)838kmi.properties.action = 'TOGGLE'839kmi = km.keymap_items.new('mask.select_all', 'I', 'PRESS', ctrl=True)840kmi.properties.action = 'INVERT'841kmi = km.keymap_items.new('mask.select_linked', 'L', 'PRESS', ctrl=True)842kmi = km.keymap_items.new('mask.select_linked_pick', 'L', 'PRESS')843kmi.properties.deselect = False844kmi = km.keymap_items.new('mask.select_linked_pick', 'L', 'PRESS', shift=True)845kmi.properties.deselect = True846kmi = km.keymap_items.new('mask.select_border', 'B', 'PRESS')847kmi = km.keymap_items.new('mask.select_circle', 'C', 'PRESS')848kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)849kmi.properties.deselect = False850kmi = km.keymap_items.new('mask.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)851kmi.properties.deselect = True852kmi = km.keymap_items.new('mask.hide_view_clear', 'H', 'PRESS', alt=True)853kmi = km.keymap_items.new('mask.hide_view_set', 'H', 'PRESS')854kmi.properties.unselected = False855kmi = km.keymap_items.new('mask.hide_view_set', 'H', 'PRESS', shift=True)856kmi.properties.unselected = True857kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS', ctrl=True)858kmi.properties.extend = False859kmi = km.keymap_items.new('mask.cyclic_toggle', 'C', 'PRESS', alt=True)860kmi = km.keymap_items.new('mask.slide_point', 'ACTIONMOUSE', 'PRESS')861kmi = km.keymap_items.new('mask.handle_type_set', 'V', 'PRESS')862kmi = km.keymap_items.new('mask.normals_make_consistent', 'N', 'PRESS', ctrl=True)863kmi = km.keymap_items.new('mask.parent_set', 'P', 'PRESS', ctrl=True)864kmi = km.keymap_items.new('mask.parent_clear', 'P', 'PRESS', alt=True)865kmi = km.keymap_items.new('mask.shape_key_insert', 'I', 'PRESS')866kmi = km.keymap_items.new('mask.shape_key_clear', 'I', 'PRESS', alt=True)867kmi = km.keymap_items.new('uv.cursor_set', 'ACTIONMOUSE', 'PRESS')868kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')869kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')870kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')871kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')872kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS', alt=True)873kmi.properties.mode = 'MASK_SHRINKFATTEN'874# Map Graph Editor875km = kc.keymaps.new('Graph Editor', space_type='GRAPH_EDITOR', region_type='WINDOW', modal=False)876kmi = km.keymap_items.new('wm.context_toggle', 'H', 'PRESS', ctrl=True)877kmi.properties.data_path = 'space_data.show_handles'878kmi = km.keymap_items.new('graph.cursor_set', 'ACTIONMOUSE', 'PRESS')879kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS')880kmi.properties.extend = False881kmi.properties.column = False882kmi.properties.curves = False883kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', alt=True)884kmi.properties.extend = False885kmi.properties.column = True886kmi.properties.curves = False887kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True)888kmi.properties.extend = True889kmi.properties.column = False890kmi.properties.curves = False891kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)892kmi.properties.extend = True893kmi.properties.column = True894kmi.properties.curves = False895kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)896kmi.properties.extend = False897kmi.properties.column = False898kmi.properties.curves = True899kmi = km.keymap_items.new('graph.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)900kmi.properties.extend = True901kmi.properties.column = False902kmi.properties.curves = True903kmi = km.keymap_items.new('graph.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)904kmi.properties.mode = 'CHECK'905kmi.properties.extend = False906kmi = km.keymap_items.new('graph.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)907kmi.properties.mode = 'CHECK'908kmi.properties.extend = True909kmi = km.keymap_items.new('graph.select_leftright', 'LEFT_BRACKET', 'PRESS')910kmi.properties.mode = 'LEFT'911kmi.properties.extend = False912kmi = km.keymap_items.new('graph.select_leftright', 'RIGHT_BRACKET', 'PRESS')913kmi.properties.mode = 'RIGHT'914kmi.properties.extend = False915kmi = km.keymap_items.new('graph.select_all_toggle', 'A', 'PRESS', ctrl=True)916kmi.properties.invert = False917kmi = km.keymap_items.new('graph.select_all_toggle', 'I', 'PRESS', ctrl=True)918kmi.properties.invert = True919kmi = km.keymap_items.new('graph.select_border', 'B', 'PRESS')920kmi.properties.axis_range = False921kmi.properties.include_handles = False922kmi = km.keymap_items.new('graph.select_border', 'B', 'PRESS', alt=True)923kmi.properties.axis_range = True924kmi.properties.include_handles = False925kmi = km.keymap_items.new('graph.select_border', 'B', 'PRESS', ctrl=True)926kmi.properties.axis_range = False927kmi.properties.include_handles = True928kmi = km.keymap_items.new('graph.select_border', 'B', 'PRESS', ctrl=True, alt=True)929kmi.properties.axis_range = True930kmi.properties.include_handles = True931kmi = km.keymap_items.new('graph.select_column', 'K', 'PRESS')932kmi.properties.mode = 'KEYS'933kmi = km.keymap_items.new('graph.select_column', 'K', 'PRESS', ctrl=True)934kmi.properties.mode = 'CFRA'935kmi = km.keymap_items.new('graph.select_column', 'K', 'PRESS', shift=True)936kmi.properties.mode = 'MARKERS_COLUMN'937kmi = km.keymap_items.new('graph.select_column', 'K', 'PRESS', alt=True)938kmi.properties.mode = 'MARKERS_BETWEEN'939kmi = km.keymap_items.new('graph.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)940kmi = km.keymap_items.new('graph.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)941kmi = km.keymap_items.new('graph.select_linked', 'L', 'PRESS')942kmi = km.keymap_items.new('graph.frame_jump', 'G', 'PRESS', ctrl=True)943kmi = km.keymap_items.new('graph.snap', 'S', 'PRESS', shift=True)944kmi = km.keymap_items.new('graph.mirror', 'M', 'PRESS', shift=True)945kmi = km.keymap_items.new('graph.handle_type', 'V', 'PRESS')946kmi = km.keymap_items.new('graph.interpolation_type', 'T', 'PRESS')947kmi = km.keymap_items.new('graph.clean', 'O', 'PRESS')948kmi = km.keymap_items.new('graph.smooth', 'O', 'PRESS', alt=True)949kmi = km.keymap_items.new('graph.sample', 'O', 'PRESS', shift=True)950kmi = km.keymap_items.new('graph.bake', 'C', 'PRESS', alt=True)951kmi = km.keymap_items.new('graph.delete', 'X', 'PRESS')952kmi = km.keymap_items.new('graph.delete', 'DEL', 'PRESS')953kmi = km.keymap_items.new('graph.duplicate_move', 'D', 'PRESS', shift=True)954kmi = km.keymap_items.new('graph.keyframe_insert', 'I', 'PRESS')955kmi = km.keymap_items.new('graph.click_insert', 'ACTIONMOUSE', 'CLICK', ctrl=True)956kmi = km.keymap_items.new('graph.copy', 'C', 'PRESS', ctrl=True)957kmi = km.keymap_items.new('graph.paste', 'V', 'PRESS', ctrl=True)958kmi = km.keymap_items.new('graph.previewrange_set', 'P', 'PRESS', ctrl=True, alt=True)959kmi = km.keymap_items.new('graph.view_all', 'HOME', 'PRESS')960kmi = km.keymap_items.new('graph.view_selected', 'NUMPAD_PERIOD', 'PRESS')961kmi = km.keymap_items.new('graph.fmodifier_add', 'M', 'PRESS', shift=True, ctrl=True)962kmi.properties.only_active = False963kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')964kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')965kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')966kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')967kmi.properties.mode = 'TIME_EXTEND'968kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')969kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')970kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')971kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)972# Map Node Editor973km = kc.keymaps.new('Node Editor', space_type='NODE_EDITOR', region_type='WINDOW', modal=False)974kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS')975kmi.properties.extend = False976kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS')977kmi.properties.extend = False978kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', ctrl=True)979kmi.properties.extend = False980kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', ctrl=True)981kmi.properties.extend = False982kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', alt=True)983kmi.properties.extend = False984kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', alt=True)985kmi.properties.extend = False986kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', ctrl=True, alt=True)987kmi.properties.extend = False988kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)989kmi.properties.extend = False990kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True)991kmi.properties.extend = True992kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True)993kmi.properties.extend = True994kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, ctrl=True)995kmi.properties.extend = True996kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)997kmi.properties.extend = True998kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, alt=True)999kmi.properties.extend = True1000kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)1001kmi.properties.extend = True1002kmi = km.keymap_items.new('node.select', 'ACTIONMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)1003kmi.properties.extend = True1004kmi = km.keymap_items.new('node.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)1005kmi.properties.extend = True1006kmi = km.keymap_items.new('node.select_border', 'EVT_TWEAK_S', 'ANY')1007kmi.properties.tweak = True1008kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)1009kmi.properties.deselect = False1010kmi = km.keymap_items.new('node.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)1011kmi.properties.deselect = True1012kmi = km.keymap_items.new('node.link', 'LEFTMOUSE', 'PRESS')1013kmi.properties.detach = False1014kmi = km.keymap_items.new('node.link', 'LEFTMOUSE', 'PRESS', ctrl=True)1015kmi.properties.detach = True1016kmi = km.keymap_items.new('node.resize', 'LEFTMOUSE', 'PRESS')1017kmi = km.keymap_items.new('node.add_reroute', 'LEFTMOUSE', 'PRESS', shift=True)1018kmi = km.keymap_items.new('node.links_cut', 'LEFTMOUSE', 'PRESS', ctrl=True)1019kmi = km.keymap_items.new('node.select_link_viewer', 'LEFTMOUSE', 'PRESS', shift=True, ctrl=True)1020kmi = km.keymap_items.new('node.backimage_move', 'MIDDLEMOUSE', 'PRESS', alt=True)1021kmi = km.keymap_items.new('node.backimage_zoom', 'V', 'PRESS')1022kmi.properties.factor = 0.8333299756050111023kmi = km.keymap_items.new('node.backimage_zoom', 'V', 'PRESS', alt=True)1024kmi.properties.factor = 1.20000004768371581025kmi = km.keymap_items.new('node.backimage_sample', 'ACTIONMOUSE', 'PRESS', alt=True)1026kmi = km.keymap_items.new('node.link_make', 'F', 'PRESS')1027kmi.properties.replace = False1028kmi = km.keymap_items.new('node.link_make', 'F', 'PRESS', shift=True)1029kmi.properties.replace = True1030kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)1031kmi.properties.name = 'NODE_MT_add'1032kmi = km.keymap_items.new('node.duplicate_move', 'D', 'PRESS', shift=True)1033kmi = km.keymap_items.new('node.duplicate_move_keep_inputs', 'D', 'PRESS', shift=True, ctrl=True)1034kmi = km.keymap_items.new('node.parent_set', 'P', 'PRESS', ctrl=True)1035kmi = km.keymap_items.new('node.join', 'J', 'PRESS', ctrl=True)1036kmi = km.keymap_items.new('node.hide_toggle', 'H', 'PRESS')1037kmi = km.keymap_items.new('node.mute_toggle', 'M', 'PRESS')1038kmi = km.keymap_items.new('node.preview_toggle', 'H', 'PRESS', shift=True)1039kmi = km.keymap_items.new('node.hide_socket_toggle', 'H', 'PRESS', ctrl=True)1040kmi = km.keymap_items.new('node.view_all', 'HOME', 'PRESS')1041kmi = km.keymap_items.new('node.view_selected', 'NUMPAD_PERIOD', 'PRESS')1042kmi = km.keymap_items.new('node.select_border', 'B', 'PRESS')1043kmi.properties.tweak = False1044kmi = km.keymap_items.new('node.delete', 'X', 'PRESS')1045kmi = km.keymap_items.new('node.delete', 'DEL', 'PRESS')1046kmi = km.keymap_items.new('node.delete_reconnect', 'X', 'PRESS', ctrl=True)1047kmi = km.keymap_items.new('node.select_all', 'A', 'PRESS', ctrl=True)1048kmi.properties.action = 'TOGGLE'1049kmi = km.keymap_items.new('node.select_all', 'I', 'PRESS', ctrl=True)1050kmi.properties.action = 'INVERT'1051kmi = km.keymap_items.new('node.select_linked_to', 'L', 'PRESS', shift=True)1052kmi = km.keymap_items.new('node.select_linked_from', 'L', 'PRESS')1053kmi = km.keymap_items.new('node.select_grouped', 'G', 'PRESS', shift=True)1054kmi = km.keymap_items.new('node.select_same_type_step', 'RIGHT_BRACKET', 'PRESS', shift=True)1055kmi.properties.prev = False1056kmi = km.keymap_items.new('node.select_same_type_step', 'LEFT_BRACKET', 'PRESS', shift=True)1057kmi.properties.prev = True1058kmi = km.keymap_items.new('node.find_node', 'F', 'PRESS', ctrl=True)1059kmi = km.keymap_items.new('node.group_make', 'G', 'PRESS', ctrl=True)1060kmi = km.keymap_items.new('node.group_ungroup', 'G', 'PRESS', alt=True)1061kmi = km.keymap_items.new('node.group_separate', 'P', 'PRESS')1062kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS')1063kmi.properties.exit = False1064kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS', shift=True)1065kmi.properties.exit = True1066kmi = km.keymap_items.new('node.group_make', 'G', 'PRESS', ctrl=True)1067kmi = km.keymap_items.new('node.group_ungroup', 'G', 'PRESS', alt=True)1068kmi = km.keymap_items.new('node.group_separate', 'P', 'PRESS')1069kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS')1070kmi.properties.exit = False1071kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS', shift=True)1072kmi.properties.exit = True1073kmi = km.keymap_items.new('node.group_make', 'G', 'PRESS', ctrl=True)1074kmi = km.keymap_items.new('node.group_ungroup', 'G', 'PRESS', alt=True)1075kmi = km.keymap_items.new('node.group_separate', 'P', 'PRESS')1076kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS')1077kmi.properties.exit = False1078kmi = km.keymap_items.new('node.group_edit', 'TAB', 'PRESS', shift=True)1079kmi.properties.exit = True1080kmi = km.keymap_items.new('node.read_renderlayers', 'R', 'PRESS', ctrl=True)1081kmi = km.keymap_items.new('node.read_fullsamplelayers', 'R', 'PRESS', shift=True)1082kmi = km.keymap_items.new('node.render_changed', 'Z', 'PRESS')1083kmi = km.keymap_items.new('node.clipboard_copy', 'C', 'PRESS', ctrl=True)1084kmi = km.keymap_items.new('node.clipboard_paste', 'V', 'PRESS', ctrl=True)1085kmi = km.keymap_items.new('node.viewer_border', 'B', 'PRESS', ctrl=True)1086kmi = km.keymap_items.new('node.translate_attach', 'G', 'PRESS')1087kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_A', 'ANY')1088kmi = km.keymap_items.new('node.translate_attach', 'EVT_TWEAK_S', 'ANY')1089kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')1090kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')1091kmi = km.keymap_items.new('node.move_detach_links', 'D', 'PRESS', alt=True)1092kmi = km.keymap_items.new('node.move_detach_links_release', 'EVT_TWEAK_A', 'ANY', alt=True)1093kmi = km.keymap_items.new('node.move_detach_links', 'EVT_TWEAK_S', 'ANY', alt=True)1094kmi = km.keymap_items.new('node.detach_translate_attach', 'F', 'PRESS', alt=True)1095# Map Info1096km = kc.keymaps.new('Info', space_type='INFO', region_type='WINDOW', modal=False)1097kmi = km.keymap_items.new('info.select_pick', 'SELECTMOUSE', 'PRESS')1098kmi = km.keymap_items.new('info.select_all_toggle', 'A', 'PRESS', ctrl=True)1099kmi = km.keymap_items.new('info.select_border', 'B', 'PRESS')1100kmi = km.keymap_items.new('info.report_replay', 'R', 'PRESS')1101kmi = km.keymap_items.new('info.report_delete', 'X', 'PRESS')1102kmi = km.keymap_items.new('info.report_delete', 'DEL', 'PRESS')1103kmi = km.keymap_items.new('info.report_copy', 'C', 'PRESS', ctrl=True)1104# Map File Browser Main1105km = kc.keymaps.new('File Browser Main', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)1106kmi = km.keymap_items.new('file.execute', 'LEFTMOUSE', 'DOUBLE_CLICK')1107kmi.properties.need_active = True1108kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK')1109kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK', shift=True)1110kmi.properties.extend = True1111kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK', alt=True)1112kmi.properties.extend = True1113kmi.properties.fill = True1114kmi = km.keymap_items.new('file.select', 'RIGHTMOUSE', 'CLICK')1115kmi.properties.open = False1116kmi = km.keymap_items.new('file.select', 'RIGHTMOUSE', 'CLICK', shift=True)1117kmi.properties.extend = True1118kmi.properties.open = False1119kmi = km.keymap_items.new('file.select', 'RIGHTMOUSE', 'CLICK', alt=True)1120kmi.properties.extend = True1121kmi.properties.fill = True1122kmi.properties.open = False1123kmi = km.keymap_items.new('file.select_all_toggle', 'A', 'PRESS', ctrl=True)1124kmi = km.keymap_items.new('file.refresh', 'NUMPAD_PERIOD', 'PRESS')1125kmi = km.keymap_items.new('file.select_border', 'B', 'PRESS')1126kmi = km.keymap_items.new('file.select_border', 'EVT_TWEAK_L', 'ANY')1127kmi = km.keymap_items.new('file.rename', 'LEFTMOUSE', 'PRESS', ctrl=True)1128kmi = km.keymap_items.new('file.highlight', 'MOUSEMOVE', 'ANY', any=True)1129kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS')1130kmi.properties.increment = 11131kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS', shift=True)1132kmi.properties.increment = 101133kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS', ctrl=True)1134kmi.properties.increment = 1001135kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS')1136kmi.properties.increment = -11137kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS', shift=True)1138kmi.properties.increment = -101139kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS', ctrl=True)1140kmi.properties.increment = -1001141# Map Dopesheet1142km = kc.keymaps.new('Dopesheet', space_type='DOPESHEET_EDITOR', region_type='WINDOW', modal=False)1143kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS')1144kmi.properties.extend = False1145kmi.properties.column = False1146kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', alt=True)1147kmi.properties.extend = False1148kmi.properties.column = True1149kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', shift=True)1150kmi.properties.extend = True1151kmi.properties.column = False1152kmi = km.keymap_items.new('action.clickselect', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)1153kmi.properties.extend = True1154kmi.properties.column = True1155kmi = km.keymap_items.new('action.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)1156kmi.properties.mode = 'CHECK'1157kmi.properties.extend = False1158kmi = km.keymap_items.new('action.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)1159kmi.properties.mode = 'CHECK'1160kmi.properties.extend = True1161kmi = km.keymap_items.new('action.select_leftright', 'LEFT_BRACKET', 'PRESS')1162kmi.properties.mode = 'LEFT'1163kmi.properties.extend = False1164kmi = km.keymap_items.new('action.select_leftright', 'RIGHT_BRACKET', 'PRESS')1165kmi.properties.mode = 'RIGHT'1166kmi.properties.extend = False1167kmi = km.keymap_items.new('action.select_all_toggle', 'A', 'PRESS', ctrl=True)1168kmi.properties.invert = False1169kmi = km.keymap_items.new('action.select_all_toggle', 'I', 'PRESS', ctrl=True)1170kmi.properties.invert = True1171kmi = km.keymap_items.new('action.select_border', 'B', 'PRESS')1172kmi.properties.axis_range = False1173kmi = km.keymap_items.new('action.select_border', 'B', 'PRESS', alt=True)1174kmi.properties.axis_range = True1175kmi = km.keymap_items.new('action.select_column', 'K', 'PRESS')1176kmi.properties.mode = 'KEYS'1177kmi = km.keymap_items.new('action.select_column', 'K', 'PRESS', ctrl=True)1178kmi.properties.mode = 'CFRA'1179kmi = km.keymap_items.new('action.select_column', 'K', 'PRESS', shift=True)1180kmi.properties.mode = 'MARKERS_COLUMN'1181kmi = km.keymap_items.new('action.select_column', 'K', 'PRESS', alt=True)1182kmi.properties.mode = 'MARKERS_BETWEEN'1183kmi = km.keymap_items.new('action.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)1184kmi = km.keymap_items.new('action.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)1185kmi = km.keymap_items.new('action.select_linked', 'L', 'PRESS')1186kmi = km.keymap_items.new('action.frame_jump', 'G', 'PRESS', ctrl=True)1187kmi = km.keymap_items.new('action.snap', 'S', 'PRESS', shift=True)1188kmi = km.keymap_items.new('action.mirror', 'M', 'PRESS', shift=True)1189kmi = km.keymap_items.new('action.handle_type', 'V', 'PRESS')1190kmi = km.keymap_items.new('action.interpolation_type', 'T', 'PRESS')1191kmi = km.keymap_items.new('action.extrapolation_type', 'E', 'PRESS', shift=True)1192kmi = km.keymap_items.new('action.keyframe_type', 'R', 'PRESS')1193kmi = km.keymap_items.new('action.clean', 'O', 'PRESS')1194kmi = km.keymap_items.new('action.sample', 'O', 'PRESS', shift=True)1195kmi = km.keymap_items.new('action.delete', 'X', 'PRESS')1196kmi = km.keymap_items.new('action.delete', 'DEL', 'PRESS')1197kmi = km.keymap_items.new('action.duplicate_move', 'D', 'PRESS', shift=True)1198kmi = km.keymap_items.new('action.keyframe_insert', 'I', 'PRESS')1199kmi = km.keymap_items.new('action.copy', 'C', 'PRESS', ctrl=True)1200kmi = km.keymap_items.new('action.paste', 'V', 'PRESS', ctrl=True)1201kmi = km.keymap_items.new('action.previewrange_set', 'P', 'PRESS', ctrl=True, alt=True)1202kmi = km.keymap_items.new('action.view_all', 'HOME', 'PRESS')1203kmi = km.keymap_items.new('action.view_selected', 'NUMPAD_PERIOD', 'PRESS')1204kmi = km.keymap_items.new('anim.channels_editable_toggle', 'TAB', 'PRESS')1205kmi = km.keymap_items.new('transform.transform', 'G', 'PRESS')1206kmi.properties.mode = 'TIME_TRANSLATE'1207kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_S', 'ANY')1208kmi.properties.mode = 'TIME_TRANSLATE'1209kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')1210kmi.properties.mode = 'TIME_EXTEND'1211kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS')1212kmi.properties.mode = 'TIME_SCALE'1213kmi = km.keymap_items.new('transform.transform', 'T', 'PRESS', shift=True)1214kmi.properties.mode = 'TIME_SLIDE'1215kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')1216kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)1217# Map NLA Editor1218km = kc.keymaps.new('NLA Editor', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)1219kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'PRESS')1220kmi.properties.extend = False1221kmi = km.keymap_items.new('nla.click_select', 'SELECTMOUSE', 'PRESS', shift=True)1222kmi.properties.extend = True1223kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', ctrl=True)1224kmi.properties.mode = 'CHECK'1225kmi.properties.extend = False1226kmi = km.keymap_items.new('nla.select_leftright', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)1227kmi.properties.mode = 'CHECK'1228kmi.properties.extend = True1229kmi = km.keymap_items.new('nla.select_leftright', 'LEFT_BRACKET', 'PRESS')1230kmi.properties.mode = 'LEFT'1231kmi.properties.extend = False1232kmi = km.keymap_items.new('nla.select_leftright', 'RIGHT_BRACKET', 'PRESS')1233kmi.properties.mode = 'RIGHT'1234kmi.properties.extend = False1235kmi = km.keymap_items.new('nla.select_all_toggle', 'A', 'PRESS', ctrl=True)1236kmi.properties.invert = False1237kmi = km.keymap_items.new('nla.select_all_toggle', 'I', 'PRESS', ctrl=True)1238kmi.properties.invert = True1239kmi = km.keymap_items.new('nla.select_border', 'B', 'PRESS')1240kmi.properties.axis_range = False1241kmi = km.keymap_items.new('nla.select_border', 'B', 'PRESS', alt=True)1242kmi.properties.axis_range = True1243kmi = km.keymap_items.new('nla.view_all', 'HOME', 'PRESS')1244kmi = km.keymap_items.new('nla.view_selected', 'NUMPAD_PERIOD', 'PRESS')1245kmi = km.keymap_items.new('nla.tweakmode_enter', 'TAB', 'PRESS')1246kmi = km.keymap_items.new('nla.tweakmode_exit', 'TAB', 'PRESS')1247kmi = km.keymap_items.new('nla.actionclip_add', 'A', 'PRESS', shift=True)1248kmi = km.keymap_items.new('nla.transition_add', 'T', 'PRESS', shift=True)1249kmi = km.keymap_items.new('nla.soundclip_add', 'K', 'PRESS', shift=True)1250kmi = km.keymap_items.new('nla.meta_add', 'G', 'PRESS', shift=True)1251kmi = km.keymap_items.new('nla.meta_remove', 'G', 'PRESS', alt=True)1252kmi = km.keymap_items.new('nla.duplicate', 'D', 'PRESS', shift=True)1253kmi = km.keymap_items.new('nla.delete', 'X', 'PRESS')1254kmi = km.keymap_items.new('nla.delete', 'DEL', 'PRESS')1255kmi = km.keymap_items.new('nla.split', 'Y', 'PRESS')1256kmi = km.keymap_items.new('nla.mute_toggle', 'H', 'PRESS')1257kmi = km.keymap_items.new('nla.swap', 'F', 'PRESS', alt=True)1258kmi = km.keymap_items.new('nla.move_up', 'PAGE_UP', 'PRESS')1259kmi = km.keymap_items.new('nla.move_down', 'PAGE_DOWN', 'PRESS')1260kmi = km.keymap_items.new('nla.apply_scale', 'A', 'PRESS', shift=True, ctrl=True)1261kmi = km.keymap_items.new('nla.clear_scale', 'S', 'PRESS', alt=True)1262kmi = km.keymap_items.new('nla.snap', 'S', 'PRESS', shift=True)1263kmi = km.keymap_items.new('nla.fmodifier_add', 'M', 'PRESS', shift=True, ctrl=True)1264kmi = km.keymap_items.new('transform.transform', 'G', 'PRESS')1265kmi.properties.mode = 'TRANSLATION'1266kmi = km.keymap_items.new('transform.transform', 'EVT_TWEAK_S', 'ANY')1267kmi.properties.mode = 'TRANSLATION'1268kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')1269kmi.properties.mode = 'TIME_EXTEND'1270kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS')1271kmi.properties.mode = 'TIME_SCALE'1272kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')1273kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)1274# Map Sequencer1275km = kc.keymaps.new('Sequencer', space_type='SEQUENCE_EDITOR', region_type='WINDOW', modal=False)1276kmi = km.keymap_items.new('sequencer.select_all', 'A', 'PRESS', ctrl=True)1277kmi.properties.action = 'TOGGLE'1278kmi = km.keymap_items.new('sequencer.select_all', 'I', 'PRESS', ctrl=True)1279kmi.properties.action = 'INVERT'1280kmi = km.keymap_items.new('sequencer.cut', 'K', 'PRESS')1281kmi.properties.type = 'SOFT'1282kmi = km.keymap_items.new('sequencer.cut', 'K', 'PRESS', shift=True)1283kmi.properties.type = 'HARD'1284kmi = km.keymap_items.new('sequencer.mute', 'H', 'PRESS')1285kmi.properties.unselected = False1286kmi = km.keymap_items.new('sequencer.mute', 'H', 'PRESS', shift=True)1287kmi.properties.unselected = True1288kmi = km.keymap_items.new('sequencer.unmute', 'H', 'PRESS', alt=True)1289kmi.properties.unselected = False1290kmi = km.keymap_items.new('sequencer.unmute', 'H', 'PRESS', shift=True, alt=True)1291kmi.properties.unselected = True1292kmi = km.keymap_items.new('sequencer.lock', 'L', 'PRESS', shift=True)1293kmi = km.keymap_items.new('sequencer.unlock', 'L', 'PRESS', shift=True, alt=True)1294kmi = km.keymap_items.new('sequencer.reassign_inputs', 'R', 'PRESS')1295kmi = km.keymap_items.new('sequencer.reload', 'R', 'PRESS', alt=True)1296kmi = km.keymap_items.new('sequencer.reload', 'R', 'PRESS', shift=True, alt=True)1297kmi.properties.adjust_length = True1298kmi = km.keymap_items.new('sequencer.offset_clear', 'O', 'PRESS', alt=True)1299kmi = km.keymap_items.new('sequencer.duplicate_move', 'D', 'PRESS', shift=True)1300kmi = km.keymap_items.new('sequencer.delete', 'X', 'PRESS')1301kmi = km.keymap_items.new('sequencer.delete', 'DEL', 'PRESS')1302kmi = km.keymap_items.new('sequencer.copy', 'C', 'PRESS', ctrl=True)1303kmi = km.keymap_items.new('sequencer.paste', 'V', 'PRESS', ctrl=True)1304kmi = km.keymap_items.new('sequencer.images_separate', 'Y', 'PRESS')1305kmi = km.keymap_items.new('sequencer.meta_toggle', 'TAB', 'PRESS')1306kmi = km.keymap_items.new('sequencer.meta_make', 'G', 'PRESS', ctrl=True)1307kmi = km.keymap_items.new('sequencer.meta_separate', 'G', 'PRESS', alt=True)1308kmi = km.keymap_items.new('sequencer.view_all', 'HOME', 'PRESS')1309kmi = km.keymap_items.new('sequencer.view_selected', 'NUMPAD_PERIOD', 'PRESS')1310kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_UP', 'PRESS')1311kmi.properties.next = True1312kmi.properties.center = False1313kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_DOWN', 'PRESS')1314kmi.properties.next = False1315kmi.properties.center = False1316kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_UP', 'PRESS', alt=True)1317kmi.properties.next = True1318kmi.properties.center = True1319kmi = km.keymap_items.new('sequencer.strip_jump', 'PAGE_DOWN', 'PRESS', alt=True)1320kmi.properties.next = False1321kmi.properties.center = True1322kmi = km.keymap_items.new('sequencer.swap', 'LEFT_ARROW', 'PRESS', alt=True)1323kmi.properties.side = 'LEFT'1324kmi = km.keymap_items.new('sequencer.swap', 'RIGHT_ARROW', 'PRESS', alt=True)1325kmi.properties.side = 'RIGHT'1326kmi = km.keymap_items.new('sequencer.gap_remove', 'BACK_SPACE', 'PRESS')1327kmi.properties.all = False1328kmi = km.keymap_items.new('sequencer.gap_remove', 'BACK_SPACE', 'PRESS', shift=True)1329kmi.properties.all = True1330kmi = km.keymap_items.new('sequencer.gap_insert', 'EQUAL', 'PRESS', shift=True)1331kmi = km.keymap_items.new('sequencer.snap', 'S', 'PRESS', shift=True)1332kmi = km.keymap_items.new('sequencer.swap_inputs', 'S', 'PRESS', alt=True)1333kmi = km.keymap_items.new('sequencer.cut_multicam', 'ONE', 'PRESS')1334kmi.properties.camera = 11335kmi = km.keymap_items.new('sequencer.cut_multicam', 'TWO', 'PRESS')1336kmi.properties.camera = 21337kmi = km.keymap_items.new('sequencer.cut_multicam', 'THREE', 'PRESS')1338kmi.properties.camera = 31339kmi = km.keymap_items.new('sequencer.cut_multicam', 'FOUR', 'PRESS')1340kmi.properties.camera = 41341kmi = km.keymap_items.new('sequencer.cut_multicam', 'FIVE', 'PRESS')1342kmi.properties.camera = 51343kmi = km.keymap_items.new('sequencer.cut_multicam', 'SIX', 'PRESS')1344kmi.properties.camera = 61345kmi = km.keymap_items.new('sequencer.cut_multicam', 'SEVEN', 'PRESS')1346kmi.properties.camera = 71347kmi = km.keymap_items.new('sequencer.cut_multicam', 'EIGHT', 'PRESS')1348kmi.properties.camera = 81349kmi = km.keymap_items.new('sequencer.cut_multicam', 'NINE', 'PRESS')1350kmi.properties.camera = 91351kmi = km.keymap_items.new('sequencer.cut_multicam', 'ZERO', 'PRESS')1352kmi.properties.camera = 101353kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS')1354kmi.properties.extend = False1355kmi.properties.linked_handle = False1356kmi.properties.left_right = 'NONE'1357kmi.properties.linked_time = False1358kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', shift=True)1359kmi.properties.extend = True1360kmi.properties.linked_handle = False1361kmi.properties.left_right = 'NONE'1362kmi.properties.linked_time = False1363kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', alt=True)1364kmi.properties.extend = False1365kmi.properties.linked_handle = True1366kmi.properties.left_right = 'NONE'1367kmi.properties.linked_time = False1368kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)1369kmi.properties.extend = True1370kmi.properties.linked_handle = True1371kmi.properties.left_right = 'NONE'1372kmi.properties.linked_time = False1373kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', ctrl=True)1374kmi.properties.extend = False1375kmi.properties.linked_handle = False1376kmi.properties.left_right = 'MOUSE'1377kmi.properties.linked_time = True1378kmi = km.keymap_items.new('sequencer.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)1379kmi.properties.extend = True1380kmi.properties.linked_handle = False1381kmi.properties.left_right = 'NONE'1382kmi.properties.linked_time = True1383kmi = km.keymap_items.new('sequencer.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)1384kmi = km.keymap_items.new('sequencer.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)1385kmi = km.keymap_items.new('sequencer.select_linked_pick', 'L', 'PRESS')1386kmi.properties.extend = False1387kmi = km.keymap_items.new('sequencer.select_linked_pick', 'L', 'PRESS', shift=True)1388kmi.properties.extend = True1389kmi = km.keymap_items.new('sequencer.select_linked', 'L', 'PRESS', ctrl=True)1390kmi = km.keymap_items.new('sequencer.select_border', 'B', 'PRESS')1391kmi = km.keymap_items.new('sequencer.select_grouped', 'G', 'PRESS', shift=True)1392kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)1393kmi.properties.name = 'SEQUENCER_MT_add'1394kmi = km.keymap_items.new('wm.call_menu', 'C', 'PRESS')1395kmi.properties.name = 'SEQUENCER_MT_change'1396kmi = km.keymap_items.new('wm.context_set_int', 'O', 'PRESS')1397kmi.properties.data_path = 'scene.sequence_editor.overlay_frame'1398kmi.properties.value = 01399kmi = km.keymap_items.new('transform.seq_slide', 'G', 'PRESS')1400kmi = km.keymap_items.new('transform.seq_slide', 'EVT_TWEAK_S', 'ANY')1401kmi = km.keymap_items.new('transform.transform', 'E', 'PRESS')1402kmi.properties.mode = 'TIME_EXTEND'1403kmi = km.keymap_items.new('marker.add', 'M', 'PRESS')1404kmi = km.keymap_items.new('marker.rename', 'M', 'PRESS', ctrl=True)1405# Map Clip Editor1406km = kc.keymaps.new('Clip Editor', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)1407kmi = km.keymap_items.new('clip.view_pan', 'MIDDLEMOUSE', 'PRESS')1408kmi = km.keymap_items.new('clip.view_pan', 'MIDDLEMOUSE', 'PRESS', shift=True)1409kmi = km.keymap_items.new('clip.view_pan', 'TRACKPADPAN', 'ANY')1410kmi = km.keymap_items.new('clip.view_zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)1411kmi = km.keymap_items.new('clip.view_zoom', 'TRACKPADZOOM', 'ANY')1412kmi = km.keymap_items.new('clip.view_zoom', 'TRACKPADPAN', 'ANY', ctrl=True)1413kmi = km.keymap_items.new('clip.view_zoom_in', 'WHEELINMOUSE', 'PRESS')1414kmi = km.keymap_items.new('clip.view_zoom_out', 'WHEELOUTMOUSE', 'PRESS')1415kmi = km.keymap_items.new('clip.view_zoom_in', 'NUMPAD_PLUS', 'PRESS')1416kmi = km.keymap_items.new('clip.view_zoom_out', 'NUMPAD_MINUS', 'PRESS')1417kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_8', 'PRESS', ctrl=True)1418kmi.properties.ratio = 8.01419kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_4', 'PRESS', ctrl=True)1420kmi.properties.ratio = 4.01421kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_2', 'PRESS', ctrl=True)1422kmi.properties.ratio = 2.01423kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_8', 'PRESS', shift=True)1424kmi.properties.ratio = 8.01425kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_4', 'PRESS', shift=True)1426kmi.properties.ratio = 4.01427kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_2', 'PRESS', shift=True)1428kmi.properties.ratio = 2.01429kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_1', 'PRESS')1430kmi.properties.ratio = 1.01431kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_2', 'PRESS')1432kmi.properties.ratio = 0.51433kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_4', 'PRESS')1434kmi.properties.ratio = 0.251435kmi = km.keymap_items.new('clip.view_zoom_ratio', 'NUMPAD_8', 'PRESS')1436kmi.properties.ratio = 0.1251437kmi = km.keymap_items.new('clip.view_all', 'HOME', 'PRESS')1438kmi = km.keymap_items.new('clip.view_all', 'F', 'PRESS')1439kmi.properties.fit_view = True1440kmi = km.keymap_items.new('clip.view_selected', 'NUMPAD_PERIOD', 'PRESS')1441kmi = km.keymap_items.new('clip.view_all', 'NDOF_BUTTON_FIT', 'PRESS')1442kmi = km.keymap_items.new('clip.view_ndof', 'NDOF_MOTION', 'ANY')1443kmi = km.keymap_items.new('clip.frame_jump', 'LEFT_ARROW', 'PRESS', shift=True, ctrl=True)1444kmi.properties.position = 'PATHSTART'1445kmi = km.keymap_items.new('clip.frame_jump', 'RIGHT_ARROW', 'PRESS', shift=True, ctrl=True)1446kmi.properties.position = 'PATHEND'1447kmi = km.keymap_items.new('clip.frame_jump', 'LEFT_ARROW', 'PRESS', shift=True, alt=True)1448kmi.properties.position = 'FAILEDPREV'1449kmi = km.keymap_items.new('clip.frame_jump', 'RIGHT_ARROW', 'PRESS', shift=True, alt=True)1450kmi.properties.position = 'PATHSTART'1451kmi = km.keymap_items.new('clip.change_frame', 'LEFTMOUSE', 'PRESS')1452kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS')1453kmi.properties.extend = False1454kmi = km.keymap_items.new('clip.select', 'SELECTMOUSE', 'PRESS', shift=True)1455kmi.properties.extend = True1456kmi = km.keymap_items.new('clip.select_all', 'A', 'PRESS', ctrl=True)1457kmi.properties.action = 'TOGGLE'1458kmi = km.keymap_items.new('clip.select_all', 'I', 'PRESS', ctrl=True)1459kmi.properties.action = 'INVERT'1460kmi = km.keymap_items.new('clip.select_border', 'B', 'PRESS')1461kmi = km.keymap_items.new('clip.select_circle', 'C', 'PRESS')1462kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', shift=True)1463kmi.properties.name = 'CLIP_MT_select_grouped'1464kmi = km.keymap_items.new('clip.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True, alt=True)1465kmi.properties.deselect = False1466kmi = km.keymap_items.new('clip.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True, alt=True)1467kmi.properties.deselect = True1468kmi = km.keymap_items.new('clip.add_marker_slide', 'LEFTMOUSE', 'PRESS', ctrl=True)1469kmi = km.keymap_items.new('clip.delete_marker', 'DEL', 'PRESS', shift=True)1470kmi = km.keymap_items.new('clip.delete_marker', 'X', 'PRESS', shift=True)1471kmi = km.keymap_items.new('clip.slide_marker', 'LEFTMOUSE', 'PRESS')1472kmi = km.keymap_items.new('clip.disable_markers', 'D', 'PRESS', shift=True)1473kmi.properties.action = 'TOGGLE'1474kmi = km.keymap_items.new('clip.delete_track', 'DEL', 'PRESS')1475kmi = km.keymap_items.new('clip.delete_track', 'X', 'PRESS')1476kmi = km.keymap_items.new('clip.lock_tracks', 'L', 'PRESS', ctrl=True)1477kmi.properties.action = 'LOCK'1478kmi = km.keymap_items.new('clip.lock_tracks', 'L', 'PRESS', alt=True)1479kmi.properties.action = 'UNLOCK'1480kmi = km.keymap_items.new('clip.hide_tracks', 'H', 'PRESS')1481kmi.properties.unselected = False1482kmi = km.keymap_items.new('clip.hide_tracks', 'H', 'PRESS', shift=True)1483kmi.properties.unselected = True1484kmi = km.keymap_items.new('clip.hide_tracks_clear', 'H', 'PRESS', alt=True)1485kmi = km.keymap_items.new('clip.join_tracks', 'J', 'PRESS', ctrl=True)1486kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS')1487kmi.properties.name = 'CLIP_MT_tracking_specials'1488kmi = km.keymap_items.new('wm.context_toggle', 'L', 'PRESS')1489kmi.properties.data_path = 'space_data.lock_selection'1490kmi = km.keymap_items.new('wm.context_toggle', 'D', 'PRESS', alt=True)1491kmi.properties.data_path = 'space_data.show_disabled'1492kmi = km.keymap_items.new('wm.context_toggle', 'S', 'PRESS', alt=True)1493kmi.properties.data_path = 'space_data.show_marker_search'1494kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')1495kmi.properties.data_path = 'space_data.use_mute_footage'1496kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')1497kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')1498kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')1499kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')1500kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', alt=True)1501kmi.properties.action = 'REMAINED'1502kmi.properties.clear_active = False1503kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', shift=True)1504kmi.properties.action = 'UPTO'1505kmi.properties.clear_active = False1506kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', shift=True, alt=True)1507kmi.properties.action = 'ALL'1508kmi.properties.clear_active = False1509# Map Clip Graph Editor1510km = kc.keymaps.new('Clip Graph Editor', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)1511kmi = km.keymap_items.new('clip.change_frame', 'ACTIONMOUSE', 'PRESS')1512kmi = km.keymap_items.new('clip.graph_select', 'SELECTMOUSE', 'PRESS')1513kmi.properties.extend = False1514kmi = km.keymap_items.new('clip.graph_select', 'SELECTMOUSE', 'PRESS', shift=True)1515kmi.properties.extend = True1516kmi = km.keymap_items.new('clip.graph_select_all_markers', 'A', 'PRESS', ctrl=True)1517kmi.properties.action = 'TOGGLE'1518kmi = km.keymap_items.new('clip.graph_select_all_markers', 'I', 'PRESS', ctrl=True)1519kmi.properties.action = 'INVERT'1520kmi = km.keymap_items.new('clip.graph_select_border', 'B', 'PRESS')1521kmi = km.keymap_items.new('clip.graph_delete_curve', 'DEL', 'PRESS')1522kmi = km.keymap_items.new('clip.graph_delete_curve', 'X', 'PRESS')1523kmi = km.keymap_items.new('clip.graph_delete_knot', 'DEL', 'PRESS', shift=True)1524kmi = km.keymap_items.new('clip.graph_delete_knot', 'X', 'PRESS', shift=True)1525kmi = km.keymap_items.new('clip.graph_view_all', 'HOME', 'PRESS')1526kmi = km.keymap_items.new('clip.graph_center_current_frame', 'NUMPAD_PERIOD', 'PRESS')1527kmi = km.keymap_items.new('wm.context_toggle', 'L', 'PRESS')1528kmi.properties.data_path = 'space_data.lock_time_cursor'1529kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', alt=True)1530kmi.properties.action = 'REMAINED'1531kmi.properties.clear_active = True1532kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', shift=True)1533kmi.properties.action = 'UPTO'1534kmi.properties.clear_active = True1535kmi = km.keymap_items.new('clip.clear_track_path', 'T', 'PRESS', shift=True, alt=True)1536kmi.properties.action = 'ALL'1537kmi.properties.clear_active = True1538kmi = km.keymap_items.new('clip.graph_disable_markers', 'D', 'PRESS', shift=True)1539kmi.properties.action = 'TOGGLE'1540kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS')1541kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')1542kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS')1543kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS')1544# Map Image Paint1545km = kc.keymaps.new('Image Paint', space_type='EMPTY', region_type='WINDOW', modal=False)1546kmi = km.keymap_items.new('paint.image_paint', 'LEFTMOUSE', 'PRESS')1547kmi.properties.mode = 'NORMAL'1548kmi = km.keymap_items.new('paint.image_paint', 'LEFTMOUSE', 'PRESS', ctrl=True)1549kmi.properties.mode = 'INVERT'1550kmi = km.keymap_items.new('paint.grab_clone', 'RIGHTMOUSE', 'PRESS')1551kmi = km.keymap_items.new('paint.sample_color', 'RIGHTMOUSE', 'PRESS')1552kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')1553kmi.properties.mode = 'image_paint'1554kmi.properties.index = 01555kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')1556kmi.properties.mode = 'image_paint'1557kmi.properties.index = 11558kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')1559kmi.properties.mode = 'image_paint'1560kmi.properties.index = 21561kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')1562kmi.properties.mode = 'image_paint'1563kmi.properties.index = 31564kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')1565kmi.properties.mode = 'image_paint'1566kmi.properties.index = 41567kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')1568kmi.properties.mode = 'image_paint'1569kmi.properties.index = 51570kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')1571kmi.properties.mode = 'image_paint'1572kmi.properties.index = 61573kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')1574kmi.properties.mode = 'image_paint'1575kmi.properties.index = 71576kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')1577kmi.properties.mode = 'image_paint'1578kmi.properties.index = 81579kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')1580kmi.properties.mode = 'image_paint'1581kmi.properties.index = 91582kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)1583kmi.properties.mode = 'image_paint'1584kmi.properties.index = 101585kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)1586kmi.properties.mode = 'image_paint'1587kmi.properties.index = 111588kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)1589kmi.properties.mode = 'image_paint'1590kmi.properties.index = 121591kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)1592kmi.properties.mode = 'image_paint'1593kmi.properties.index = 131594kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)1595kmi.properties.mode = 'image_paint'1596kmi.properties.index = 141597kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS', shift=True)1598kmi.properties.mode = 'image_paint'1599kmi.properties.index = 151600kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS', shift=True)1601kmi.properties.mode = 'image_paint'1602kmi.properties.index = 161603kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS', shift=True)1604kmi.properties.mode = 'image_paint'1605kmi.properties.index = 171606kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS', shift=True)1607kmi.properties.mode = 'image_paint'1608kmi.properties.index = 181609kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS', shift=True)1610kmi.properties.mode = 'image_paint'1611kmi.properties.index = 191612kmi = km.keymap_items.new('brush.scale_size', 'LEFT_BRACKET', 'PRESS')1613kmi.properties.scalar = 0.89999997615814211614kmi = km.keymap_items.new('brush.scale_size', 'RIGHT_BRACKET', 'PRESS')1615kmi.properties.scalar = 1.11111116409301761616kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', ctrl=True)1617kmi.properties.data_path_primary = 'tool_settings.image_paint.brush.size'1618kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.size'1619kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_size'1620kmi.properties.rotation_path = 'tool_settings.image_paint.brush.texture_slot.angle'1621kmi.properties.color_path = 'tool_settings.image_paint.brush.cursor_color_add'1622kmi.properties.fill_color_path = 'tool_settings.image_paint.brush.color'1623kmi.properties.zoom_path = 'space_data.zoom'1624kmi.properties.image_id = 'tool_settings.image_paint.brush'1625kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', shift=True)1626kmi.properties.data_path_primary = 'tool_settings.image_paint.brush.strength'1627kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.strength'1628kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_strength'1629kmi.properties.rotation_path = 'tool_settings.image_paint.brush.texture_slot.angle'1630kmi.properties.color_path = 'tool_settings.image_paint.brush.cursor_color_add'1631kmi.properties.fill_color_path = 'tool_settings.image_paint.brush.color'1632kmi.properties.zoom_path = ''1633kmi.properties.image_id = 'tool_settings.image_paint.brush'1634kmi = km.keymap_items.new('wm.radial_control', 'W', 'PRESS')1635kmi.properties.data_path_primary = 'tool_settings.image_paint.brush.weight'1636kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.weight'1637kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_weight'1638kmi.properties.rotation_path = 'tool_settings.image_paint.brush.texture_slot.angle'1639kmi.properties.color_path = 'tool_settings.image_paint.brush.cursor_color_add'1640kmi.properties.fill_color_path = 'tool_settings.image_paint.brush.color'1641kmi.properties.zoom_path = ''1642kmi.properties.image_id = 'tool_settings.image_paint.brush'1643kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')1644kmi.properties.data_path = 'image_paint_object.data.use_paint_mask'1645# Map Vertex Paint1646km = kc.keymaps.new('Vertex Paint', space_type='EMPTY', region_type='WINDOW', modal=False)1647kmi = km.keymap_items.new('paint.vertex_paint', 'LEFTMOUSE', 'PRESS')1648kmi = km.keymap_items.new('paint.sample_color', 'RIGHTMOUSE', 'PRESS')1649kmi = km.keymap_items.new('paint.vertex_color_set', 'K', 'PRESS', shift=True)1650kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')1651kmi.properties.mode = 'vertex_paint'1652kmi.properties.index = 01653kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')1654kmi.properties.mode = 'vertex_paint'1655kmi.properties.index = 11656kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')1657kmi.properties.mode = 'vertex_paint'1658kmi.properties.index = 21659kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')1660kmi.properties.mode = 'vertex_paint'1661kmi.properties.index = 31662kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')1663kmi.properties.mode = 'vertex_paint'1664kmi.properties.index = 41665kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')1666kmi.properties.mode = 'vertex_paint'1667kmi.properties.index = 51668kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')1669kmi.properties.mode = 'vertex_paint'1670kmi.properties.index = 61671kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')1672kmi.properties.mode = 'vertex_paint'1673kmi.properties.index = 71674kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')1675kmi.properties.mode = 'vertex_paint'1676kmi.properties.index = 81677kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')1678kmi.properties.mode = 'vertex_paint'1679kmi.properties.index = 91680kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)1681kmi.properties.mode = 'vertex_paint'1682kmi.properties.index = 101683kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)1684kmi.properties.mode = 'vertex_paint'1685kmi.properties.index = 111686kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)1687kmi.properties.mode = 'vertex_paint'1688kmi.properties.index = 121689kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)1690kmi.properties.mode = 'vertex_paint'1691kmi.properties.index = 131692kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)1693kmi.properties.mode = 'vertex_paint'1694kmi.properties.index = 141695kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS', shift=True)1696kmi.properties.mode = 'vertex_paint'1697kmi.properties.index = 151698kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS', shift=True)1699kmi.properties.mode = 'vertex_paint'1700kmi.properties.index = 161701kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS', shift=True)1702kmi.properties.mode = 'vertex_paint'1703kmi.properties.index = 171704kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS', shift=True)1705kmi.properties.mode = 'vertex_paint'1706kmi.properties.index = 181707kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS', shift=True)1708kmi.properties.mode = 'vertex_paint'1709kmi.properties.index = 191710kmi = km.keymap_items.new('brush.scale_size', 'LEFT_BRACKET', 'PRESS')1711kmi.properties.scalar = 0.89999997615814211712kmi = km.keymap_items.new('brush.scale_size', 'RIGHT_BRACKET', 'PRESS')1713kmi.properties.scalar = 1.11111116409301761714kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', ctrl=True)1715kmi.properties.data_path_primary = 'tool_settings.vertex_paint.brush.size'1716kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.size'1717kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_size'1718kmi.properties.rotation_path = 'tool_settings.vertex_paint.brush.texture_slot.angle'1719kmi.properties.color_path = 'tool_settings.vertex_paint.brush.cursor_color_add'1720kmi.properties.fill_color_path = 'tool_settings.vertex_paint.brush.color'1721kmi.properties.zoom_path = ''1722kmi.properties.image_id = 'tool_settings.vertex_paint.brush'1723kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', shift=True)1724kmi.properties.data_path_primary = 'tool_settings.vertex_paint.brush.strength'1725kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.strength'1726kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_strength'1727kmi.properties.rotation_path = 'tool_settings.vertex_paint.brush.texture_slot.angle'1728kmi.properties.color_path = 'tool_settings.vertex_paint.brush.cursor_color_add'1729kmi.properties.fill_color_path = 'tool_settings.vertex_paint.brush.color'1730kmi.properties.zoom_path = ''1731kmi.properties.image_id = 'tool_settings.vertex_paint.brush'1732kmi = km.keymap_items.new('wm.radial_control', 'Q', 'PRESS')1733kmi.properties.data_path_primary = 'tool_settings.vertex_paint.brush.weight'1734kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.weight'1735kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_weight'1736kmi.properties.rotation_path = 'tool_settings.vertex_paint.brush.texture_slot.angle'1737kmi.properties.color_path = 'tool_settings.vertex_paint.brush.cursor_color_add'1738kmi.properties.fill_color_path = 'tool_settings.vertex_paint.brush.color'1739kmi.properties.zoom_path = ''1740kmi.properties.image_id = 'tool_settings.vertex_paint.brush'1741kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')1742kmi.properties.data_path = 'vertex_paint_object.data.use_paint_mask'1743# Map Weight Paint1744km = kc.keymaps.new('Weight Paint', space_type='EMPTY', region_type='WINDOW', modal=False)1745kmi = km.keymap_items.new('paint.weight_paint', 'LEFTMOUSE', 'PRESS')1746kmi = km.keymap_items.new('paint.weight_sample', 'ACTIONMOUSE', 'PRESS', ctrl=True)1747kmi = km.keymap_items.new('paint.weight_sample_group', 'ACTIONMOUSE', 'PRESS', shift=True)1748kmi = km.keymap_items.new('paint.weight_gradient', 'LEFTMOUSE', 'PRESS', alt=True)1749kmi.properties.type = 'LINEAR'1750kmi = km.keymap_items.new('paint.weight_gradient', 'LEFTMOUSE', 'PRESS', ctrl=True, alt=True)1751kmi.properties.type = 'RADIAL'1752kmi = km.keymap_items.new('paint.weight_set', 'K', 'PRESS', shift=True)1753kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')1754kmi.properties.mode = 'weight_paint'1755kmi.properties.index = 01756kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')1757kmi.properties.mode = 'weight_paint'1758kmi.properties.index = 11759kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')1760kmi.properties.mode = 'weight_paint'1761kmi.properties.index = 21762kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')1763kmi.properties.mode = 'weight_paint'1764kmi.properties.index = 31765kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')1766kmi.properties.mode = 'weight_paint'1767kmi.properties.index = 41768kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')1769kmi.properties.mode = 'weight_paint'1770kmi.properties.index = 51771kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')1772kmi.properties.mode = 'weight_paint'1773kmi.properties.index = 61774kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')1775kmi.properties.mode = 'weight_paint'1776kmi.properties.index = 71777kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')1778kmi.properties.mode = 'weight_paint'1779kmi.properties.index = 81780kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')1781kmi.properties.mode = 'weight_paint'1782kmi.properties.index = 91783kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)1784kmi.properties.mode = 'weight_paint'1785kmi.properties.index = 101786kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)1787kmi.properties.mode = 'weight_paint'1788kmi.properties.index = 111789kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)1790kmi.properties.mode = 'weight_paint'1791kmi.properties.index = 121792kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)1793kmi.properties.mode = 'weight_paint'1794kmi.properties.index = 131795kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)1796kmi.properties.mode = 'weight_paint'1797kmi.properties.index = 141798kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS', shift=True)1799kmi.properties.mode = 'weight_paint'1800kmi.properties.index = 151801kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS', shift=True)1802kmi.properties.mode = 'weight_paint'1803kmi.properties.index = 161804kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS', shift=True)1805kmi.properties.mode = 'weight_paint'1806kmi.properties.index = 171807kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS', shift=True)1808kmi.properties.mode = 'weight_paint'1809kmi.properties.index = 181810kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS', shift=True)1811kmi.properties.mode = 'weight_paint'1812kmi.properties.index = 191813kmi = km.keymap_items.new('brush.scale_size', 'LEFT_BRACKET', 'PRESS')1814kmi.properties.scalar = 0.89999997615814211815kmi = km.keymap_items.new('brush.scale_size', 'RIGHT_BRACKET', 'PRESS')1816kmi.properties.scalar = 1.11111116409301761817kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', ctrl=True)1818kmi.properties.data_path_primary = 'tool_settings.weight_paint.brush.size'1819kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.size'1820kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_size'1821kmi.properties.rotation_path = 'tool_settings.weight_paint.brush.texture_slot.angle'1822kmi.properties.color_path = 'tool_settings.weight_paint.brush.cursor_color_add'1823kmi.properties.fill_color_path = ''1824kmi.properties.zoom_path = ''1825kmi.properties.image_id = 'tool_settings.weight_paint.brush'1826kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', shift=True)1827kmi.properties.data_path_primary = 'tool_settings.weight_paint.brush.strength'1828kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.strength'1829kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_strength'1830kmi.properties.rotation_path = 'tool_settings.weight_paint.brush.texture_slot.angle'1831kmi.properties.color_path = 'tool_settings.weight_paint.brush.cursor_color_add'1832kmi.properties.fill_color_path = ''1833kmi.properties.zoom_path = ''1834kmi.properties.image_id = 'tool_settings.weight_paint.brush'1835kmi = km.keymap_items.new('wm.radial_control', 'Q', 'PRESS')1836kmi.properties.data_path_primary = 'tool_settings.weight_paint.brush.weight'1837kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.weight'1838kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_weight'1839kmi.properties.rotation_path = 'tool_settings.weight_paint.brush.texture_slot.angle'1840kmi.properties.color_path = 'tool_settings.weight_paint.brush.cursor_color_add'1841kmi.properties.fill_color_path = ''1842kmi.properties.zoom_path = ''1843kmi.properties.image_id = 'tool_settings.weight_paint.brush'1844kmi = km.keymap_items.new('wm.context_toggle', 'M', 'PRESS')1845kmi.properties.data_path = 'weight_paint_object.data.use_paint_mask'1846kmi = km.keymap_items.new('wm.context_toggle', 'V', 'PRESS')1847kmi.properties.data_path = 'weight_paint_object.data.use_paint_mask_vertex'1848kmi = km.keymap_items.new('paint.weight_from_bones', 'Q', 'PRESS')1849# Map Sculpt1850km = kc.keymaps.new('Sculpt', space_type='EMPTY', region_type='WINDOW', modal=False)1851kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS')1852kmi.properties.mode = 'NORMAL'1853kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', ctrl=True)1854kmi.properties.mode = 'INVERT'1855kmi = km.keymap_items.new('sculpt.brush_stroke', 'LEFTMOUSE', 'PRESS', shift=True)1856kmi.properties.mode = 'SMOOTH'1857kmi = km.keymap_items.new('paint.hide_show', 'H', 'PRESS', shift=True)1858kmi.properties.action = 'SHOW'1859kmi.properties.area = 'INSIDE'1860kmi = km.keymap_items.new('paint.hide_show', 'H', 'PRESS')1861kmi.properties.action = 'HIDE'1862kmi.properties.area = 'INSIDE'1863kmi = km.keymap_items.new('paint.hide_show', 'H', 'PRESS', alt=True)1864kmi.properties.action = 'SHOW'1865kmi.properties.area = 'ALL'1866kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)1867kmi.properties.level = 01868kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)1869kmi.properties.level = 11870kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)1871kmi.properties.level = 21872kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)1873kmi.properties.level = 31874kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)1875kmi.properties.level = 41876kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)1877kmi.properties.level = 51878kmi = km.keymap_items.new('paint.mask_flood_fill', 'M', 'PRESS', alt=True)1879kmi.properties.mode = 'VALUE'1880kmi.properties.value = 0.01881kmi = km.keymap_items.new('paint.mask_flood_fill', 'I', 'PRESS', ctrl=True)1882kmi.properties.mode = 'INVERT'1883kmi = km.keymap_items.new('sculpt.dynamic_topology_toggle', 'D', 'PRESS', ctrl=True)1884kmi = km.keymap_items.new('wm.radial_control', 'D', 'PRESS', shift=True)1885kmi.properties.data_path_primary = 'tool_settings.sculpt.detail_size'1886kmi.properties.data_path_secondary = ''1887kmi.properties.use_secondary = ''1888kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'1889kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'1890kmi.properties.fill_color_path = ''1891kmi.properties.zoom_path = ''1892kmi.properties.image_id = 'tool_settings.sculpt.brush'1893kmi = km.keymap_items.new('object.subdivision_set', 'PAGE_UP', 'PRESS')1894kmi.properties.level = 11895kmi.properties.relative = True1896kmi = km.keymap_items.new('object.subdivision_set', 'PAGE_DOWN', 'PRESS')1897kmi.properties.level = -11898kmi.properties.relative = True1899kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS')1900kmi.properties.mode = 'sculpt'1901kmi.properties.index = 01902kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS')1903kmi.properties.mode = 'sculpt'1904kmi.properties.index = 11905kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS')1906kmi.properties.mode = 'sculpt'1907kmi.properties.index = 21908kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS')1909kmi.properties.mode = 'sculpt'1910kmi.properties.index = 31911kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS')1912kmi.properties.mode = 'sculpt'1913kmi.properties.index = 41914kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS')1915kmi.properties.mode = 'sculpt'1916kmi.properties.index = 51917kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS')1918kmi.properties.mode = 'sculpt'1919kmi.properties.index = 61920kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS')1921kmi.properties.mode = 'sculpt'1922kmi.properties.index = 71923kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS')1924kmi.properties.mode = 'sculpt'1925kmi.properties.index = 81926kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS')1927kmi.properties.mode = 'sculpt'1928kmi.properties.index = 91929kmi = km.keymap_items.new('brush.active_index_set', 'ONE', 'PRESS', shift=True)1930kmi.properties.mode = 'sculpt'1931kmi.properties.index = 101932kmi = km.keymap_items.new('brush.active_index_set', 'TWO', 'PRESS', shift=True)1933kmi.properties.mode = 'sculpt'1934kmi.properties.index = 111935kmi = km.keymap_items.new('brush.active_index_set', 'THREE', 'PRESS', shift=True)1936kmi.properties.mode = 'sculpt'1937kmi.properties.index = 121938kmi = km.keymap_items.new('brush.active_index_set', 'FOUR', 'PRESS', shift=True)1939kmi.properties.mode = 'sculpt'1940kmi.properties.index = 131941kmi = km.keymap_items.new('brush.active_index_set', 'FIVE', 'PRESS', shift=True)1942kmi.properties.mode = 'sculpt'1943kmi.properties.index = 141944kmi = km.keymap_items.new('brush.active_index_set', 'SIX', 'PRESS', shift=True)1945kmi.properties.mode = 'sculpt'1946kmi.properties.index = 151947kmi = km.keymap_items.new('brush.active_index_set', 'SEVEN', 'PRESS', shift=True)1948kmi.properties.mode = 'sculpt'1949kmi.properties.index = 161950kmi = km.keymap_items.new('brush.active_index_set', 'EIGHT', 'PRESS', shift=True)1951kmi.properties.mode = 'sculpt'1952kmi.properties.index = 171953kmi = km.keymap_items.new('brush.active_index_set', 'NINE', 'PRESS', shift=True)1954kmi.properties.mode = 'sculpt'1955kmi.properties.index = 181956kmi = km.keymap_items.new('brush.active_index_set', 'ZERO', 'PRESS', shift=True)1957kmi.properties.mode = 'sculpt'1958kmi.properties.index = 191959kmi = km.keymap_items.new('brush.scale_size', 'LEFT_BRACKET', 'PRESS')1960kmi.properties.scalar = 0.89999997615814211961kmi = km.keymap_items.new('brush.scale_size', 'RIGHT_BRACKET', 'PRESS')1962kmi.properties.scalar = 1.11111116409301761963kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', ctrl=True)1964kmi.properties.data_path_primary = 'tool_settings.sculpt.brush.size'1965kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.size'1966kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_size'1967kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'1968kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'1969kmi.properties.fill_color_path = ''1970kmi.properties.zoom_path = ''1971kmi.properties.image_id = 'tool_settings.sculpt.brush'1972kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', shift=True)1973kmi.properties.data_path_primary = 'tool_settings.sculpt.brush.strength'1974kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.strength'1975kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_strength'1976kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'1977kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'1978kmi.properties.fill_color_path = ''1979kmi.properties.zoom_path = ''1980kmi.properties.image_id = 'tool_settings.sculpt.brush'1981kmi = km.keymap_items.new('wm.radial_control', 'W', 'PRESS')1982kmi.properties.data_path_primary = 'tool_settings.sculpt.brush.weight'1983kmi.properties.data_path_secondary = 'tool_settings.unified_paint_settings.weight'1984kmi.properties.use_secondary = 'tool_settings.unified_paint_settings.use_unified_weight'1985kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'1986kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'1987kmi.properties.fill_color_path = ''1988kmi.properties.zoom_path = ''1989kmi.properties.image_id = 'tool_settings.sculpt.brush'1990kmi = km.keymap_items.new('wm.radial_control', 'F', 'PRESS', ctrl=True)1991kmi.properties.data_path_primary = 'tool_settings.sculpt.brush.texture_slot.angle'1992kmi.properties.data_path_secondary = ''1993kmi.properties.use_secondary = ''1994kmi.properties.rotation_path = 'tool_settings.sculpt.brush.texture_slot.angle'1995kmi.properties.color_path = 'tool_settings.sculpt.brush.cursor_color_add'1996kmi.properties.fill_color_path = ''1997kmi.properties.zoom_path = ''1998kmi.properties.image_id = 'tool_settings.sculpt.brush'1999kmi = km.keymap_items.new('paint.brush_select', 'D', 'PRESS')2000kmi.properties.paint_mode = 'SCULPT'2001kmi.properties.sculpt_tool = 'DRAW'2002kmi = km.keymap_items.new('paint.brush_select', 'S', 'PRESS')2003kmi.properties.paint_mode = 'SCULPT'2004kmi.properties.sculpt_tool = 'SMOOTH'2005kmi = km.keymap_items.new('paint.brush_select', 'P', 'PRESS')2006kmi.properties.paint_mode = 'SCULPT'2007kmi.properties.sculpt_tool = 'PINCH'2008kmi = km.keymap_items.new('paint.brush_select', 'I', 'PRESS')2009kmi.properties.paint_mode = 'SCULPT'2010kmi.properties.sculpt_tool = 'INFLATE'2011kmi = km.keymap_items.new('paint.brush_select', 'G', 'PRESS')2012kmi.properties.paint_mode = 'SCULPT'2013kmi.properties.sculpt_tool = 'GRAB'2014kmi = km.keymap_items.new('paint.brush_select', 'L', 'PRESS')2015kmi.properties.paint_mode = 'SCULPT'2016kmi.properties.sculpt_tool = 'LAYER'2017kmi = km.keymap_items.new('paint.brush_select', 'T', 'PRESS', shift=True)2018kmi.properties.paint_mode = 'SCULPT'2019kmi.properties.sculpt_tool = 'FLATTEN'2020kmi = km.keymap_items.new('paint.brush_select', 'C', 'PRESS')2021kmi.properties.paint_mode = 'SCULPT'2022kmi.properties.sculpt_tool = 'CLAY'2023kmi = km.keymap_items.new('paint.brush_select', 'C', 'PRESS', shift=True)2024kmi.properties.paint_mode = 'SCULPT'2025kmi.properties.sculpt_tool = 'CREASE'2026kmi = km.keymap_items.new('paint.brush_select', 'K', 'PRESS')2027kmi.properties.paint_mode = 'SCULPT'2028kmi.properties.sculpt_tool = 'SNAKE_HOOK'2029kmi = km.keymap_items.new('paint.brush_select', 'M', 'PRESS')2030kmi.properties.paint_mode = 'SCULPT'2031kmi.properties.sculpt_tool = 'MASK'2032kmi.properties.toggle = True2033kmi.properties.create_missing = True2034kmi = km.keymap_items.new('wm.context_menu_enum', 'A', 'PRESS')2035kmi.properties.data_path = 'tool_settings.sculpt.brush.stroke_method'2036kmi = km.keymap_items.new('wm.context_toggle', 'S', 'PRESS', shift=True)2037kmi.properties.data_path = 'tool_settings.sculpt.brush.use_smooth_stroke'2038kmi = km.keymap_items.new('wm.context_menu_enum', 'R', 'PRESS')2039kmi.properties.data_path = 'tool_settings.sculpt.brush.texture_angle_source_random'2040# Map Mesh2041km = kc.keymaps.new('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)2042kmi = km.keymap_items.new('mesh.loopcut_slide', 'R', 'PRESS', ctrl=True)2043kmi = km.keymap_items.new('mesh.inset', 'I', 'PRESS')2044kmi = km.keymap_items.new('mesh.bevel', 'B', 'PRESS', ctrl=True)2045kmi.properties.vertex_only = False2046kmi = km.keymap_items.new('mesh.bevel', 'B', 'PRESS', shift=True, ctrl=True)2047kmi.properties.vertex_only = True2048kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', alt=True)2049kmi.properties.extend = False2050kmi.properties.deselect = False2051kmi.properties.toggle = False2052kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)2053kmi.properties.extend = False2054kmi.properties.deselect = False2055kmi.properties.toggle = True2056kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)2057kmi.properties.extend = False2058kmi.properties.deselect = False2059kmi.properties.toggle = False2060kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)2061kmi.properties.extend = False2062kmi.properties.deselect = False2063kmi.properties.toggle = True2064kmi = km.keymap_items.new('mesh.shortest_path_pick', 'SELECTMOUSE', 'PRESS', ctrl=True)2065kmi = km.keymap_items.new('mesh.select_all', 'I', 'PRESS', ctrl=True)2066kmi.properties.action = 'INVERT'2067kmi = km.keymap_items.new('mesh.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)2068kmi = km.keymap_items.new('mesh.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)2069kmi = km.keymap_items.new('mesh.select_non_manifold', 'M', 'PRESS', shift=True, ctrl=True, alt=True)2070kmi = km.keymap_items.new('mesh.select_linked', 'L', 'PRESS', ctrl=True)2071kmi = km.keymap_items.new('mesh.select_linked_pick', 'L', 'PRESS', alt=True)2072kmi.properties.deselect = False2073kmi = km.keymap_items.new('mesh.select_linked_pick', 'L', 'PRESS', shift=True)2074kmi.properties.deselect = True2075kmi = km.keymap_items.new('mesh.faces_select_linked_flat', 'F', 'PRESS', shift=True, ctrl=True, alt=True)2076kmi = km.keymap_items.new('mesh.select_similar', 'G', 'PRESS', shift=True)2077kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)2078kmi.properties.name = 'VIEW3D_MT_edit_mesh_select_mode'2079kmi = km.keymap_items.new('mesh.hide', 'H', 'PRESS')2080kmi.properties.unselected = False2081kmi = km.keymap_items.new('mesh.hide', 'H', 'PRESS', shift=True)2082kmi.properties.unselected = True2083kmi = km.keymap_items.new('mesh.reveal', 'H', 'PRESS', alt=True)2084kmi = km.keymap_items.new('mesh.normals_make_consistent', 'N', 'PRESS', ctrl=True)2085kmi.properties.inside = False2086kmi = km.keymap_items.new('mesh.normals_make_consistent', 'N', 'PRESS', shift=True, ctrl=True)2087kmi.properties.inside = True2088kmi = km.keymap_items.new('view3d.edit_mesh_extrude_move_normal', 'E', 'PRESS')2089kmi = km.keymap_items.new('wm.call_menu', 'E', 'PRESS', alt=True)2090kmi.properties.name = 'VIEW3D_MT_edit_mesh_extrude'2091kmi = km.keymap_items.new('transform.edge_crease', 'E', 'PRESS', shift=True)2092kmi = km.keymap_items.new('mesh.spin', 'R', 'PRESS', alt=True)2093kmi = km.keymap_items.new('mesh.fill', 'F', 'PRESS', alt=True)2094kmi = km.keymap_items.new('mesh.beautify_fill', 'F', 'PRESS', shift=True, alt=True)2095kmi = km.keymap_items.new('mesh.quads_convert_to_tris', 'T', 'PRESS', ctrl=True)2096kmi.properties.quad_method = 'BEAUTY'2097kmi.properties.ngon_method = 'BEAUTY'2098kmi = km.keymap_items.new('mesh.quads_convert_to_tris', 'T', 'PRESS', shift=True, ctrl=True)2099kmi.properties.quad_method = 'FIXED'2100kmi.properties.ngon_method = 'CLIP'2101kmi = km.keymap_items.new('mesh.tris_convert_to_quads', 'J', 'PRESS', alt=True)2102kmi = km.keymap_items.new('mesh.rip_move', 'V', 'PRESS')2103kmi = km.keymap_items.new('mesh.rip_move_fill', 'V', 'PRESS', alt=True)2104kmi = km.keymap_items.new('mesh.merge', 'M', 'PRESS', alt=True)2105kmi = km.keymap_items.new('transform.shrink_fatten', 'S', 'PRESS', alt=True)2106kmi = km.keymap_items.new('mesh.edge_face_add', 'F', 'PRESS', ctrl=True)2107kmi = km.keymap_items.new('mesh.duplicate_move', 'D', 'PRESS', shift=True)2108kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)2109kmi.properties.name = 'INFO_MT_mesh_add'2110kmi = km.keymap_items.new('mesh.separate', 'P', 'PRESS')2111kmi = km.keymap_items.new('mesh.split', 'Y', 'PRESS')2112kmi = km.keymap_items.new('mesh.vert_connect', 'J', 'PRESS')2113kmi = km.keymap_items.new('transform.vert_slide', 'V', 'PRESS', shift=True)2114kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', ctrl=True)2115kmi.properties.rotate_source = True2116kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', shift=True, ctrl=True)2117kmi.properties.rotate_source = False2118kmi = km.keymap_items.new('wm.call_menu', 'X', 'PRESS')2119kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete'2120kmi = km.keymap_items.new('wm.call_menu', 'DEL', 'PRESS')2121kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete'2122kmi = km.keymap_items.new('mesh.knife_tool', 'K', 'PRESS')2123kmi.properties.use_occlude_geometry = True2124kmi.properties.only_selected = False2125kmi = km.keymap_items.new('mesh.knife_tool', 'K', 'PRESS', shift=True)2126kmi.properties.use_occlude_geometry = False2127kmi.properties.only_selected = True2128kmi = km.keymap_items.new('object.vertex_parent_set', 'P', 'PRESS', ctrl=True)2129kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS')2130kmi.properties.name = 'VIEW3D_MT_edit_mesh_specials'2131kmi = km.keymap_items.new('wm.call_menu', 'F', 'PRESS', ctrl=True)2132kmi.properties.name = 'VIEW3D_MT_edit_mesh_faces'2133kmi = km.keymap_items.new('wm.call_menu', 'E', 'PRESS', ctrl=True)2134kmi.properties.name = 'VIEW3D_MT_edit_mesh_edges'2135kmi = km.keymap_items.new('wm.call_menu', 'V', 'PRESS', ctrl=True)2136kmi.properties.name = 'VIEW3D_MT_edit_mesh_vertices'2137kmi = km.keymap_items.new('wm.call_menu', 'H', 'PRESS', ctrl=True)2138kmi.properties.name = 'VIEW3D_MT_hook'2139kmi = km.keymap_items.new('wm.call_menu', 'U', 'PRESS')2140kmi.properties.name = 'VIEW3D_MT_uv_map'2141kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', ctrl=True)2142kmi.properties.name = 'VIEW3D_MT_vertex_group'2143kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)2144kmi.properties.level = 02145kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)2146kmi.properties.level = 12147kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)2148kmi.properties.level = 22149kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)2150kmi.properties.level = 32151kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)2152kmi.properties.level = 42153kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)2154kmi.properties.level = 52155kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)2156kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'2157kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')2158kmi.properties.data_path = 'tool_settings.proportional_edit'2159kmi.properties.value_1 = 'DISABLED'2160kmi.properties.value_2 = 'ENABLED'2161kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS', alt=True)2162kmi.properties.data_path = 'tool_settings.proportional_edit'2163kmi.properties.value_1 = 'DISABLED'2164kmi.properties.value_2 = 'CONNECTED'2165kmi = km.keymap_items.new('wm.context_set_value', 'ONE', 'PRESS')2166kmi.properties.data_path = 'tool_settings.mesh_select_mode'2167kmi.properties.value = '(True,False,False)'2168kmi = km.keymap_items.new('wm.context_set_value', 'TWO', 'PRESS')2169kmi.properties.data_path = 'tool_settings.mesh_select_mode'2170kmi.properties.value = '(False,True,False)'2171kmi = km.keymap_items.new('wm.context_set_value', 'THREE', 'PRESS')2172kmi.properties.data_path = 'tool_settings.mesh_select_mode'2173kmi.properties.value = '(False,False,True)'2174# Map Curve2175km = kc.keymaps.new('Curve', space_type='EMPTY', region_type='WINDOW', modal=False)2176kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)2177kmi.properties.name = 'INFO_MT_edit_curve_add'2178kmi = km.keymap_items.new('curve.handle_type_set', 'V', 'PRESS')2179kmi = km.keymap_items.new('curve.vertex_add', 'LEFTMOUSE', 'CLICK', ctrl=True)2180kmi = km.keymap_items.new('curve.select_all', 'LEFTMOUSE', 'CLICK')2181kmi.properties.action = 'TOGGLE'2182kmi = km.keymap_items.new('curve.select_all', 'I', 'PRESS', ctrl=True)2183kmi.properties.action = 'INVERT'2184kmi = km.keymap_items.new('curve.select_row', 'R', 'PRESS', shift=True)2185kmi = km.keymap_items.new('curve.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)2186kmi = km.keymap_items.new('curve.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)2187kmi = km.keymap_items.new('curve.select_linked', 'L', 'PRESS', ctrl=True)2188kmi = km.keymap_items.new('curve.select_linked_pick', 'L', 'PRESS')2189kmi.properties.deselect = False2190kmi = km.keymap_items.new('curve.select_linked_pick', 'L', 'PRESS', shift=True)2191kmi.properties.deselect = True2192kmi = km.keymap_items.new('curve.separate', 'P', 'PRESS')2193kmi = km.keymap_items.new('curve.extrude_move', 'E', 'PRESS')2194kmi = km.keymap_items.new('curve.duplicate_move', 'D', 'PRESS', shift=True)2195kmi = km.keymap_items.new('curve.make_segment', 'F', 'PRESS', ctrl=True)2196kmi = km.keymap_items.new('curve.cyclic_toggle', 'C', 'PRESS', alt=True)2197kmi = km.keymap_items.new('curve.delete', 'X', 'PRESS')2198kmi = km.keymap_items.new('curve.delete', 'DEL', 'PRESS')2199kmi = km.keymap_items.new('curve.tilt_clear', 'T', 'PRESS', alt=True)2200kmi = km.keymap_items.new('transform.tilt', 'T', 'PRESS', ctrl=True)2201kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS', alt=True)2202kmi.properties.mode = 'CURVE_SHRINKFATTEN'2203kmi = km.keymap_items.new('curve.reveal', 'H', 'PRESS', alt=True)2204kmi = km.keymap_items.new('curve.hide', 'H', 'PRESS')2205kmi.properties.unselected = False2206kmi = km.keymap_items.new('curve.hide', 'H', 'PRESS', shift=True)2207kmi.properties.unselected = True2208kmi = km.keymap_items.new('object.vertex_parent_set', 'P', 'PRESS', ctrl=True)2209kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS')2210kmi.properties.name = 'VIEW3D_MT_edit_curve_specials'2211kmi = km.keymap_items.new('wm.call_menu', 'H', 'PRESS', ctrl=True)2212kmi.properties.name = 'VIEW3D_MT_hook'2213kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)2214kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'2215kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')2216kmi.properties.data_path = 'tool_settings.proportional_edit'2217kmi.properties.value_1 = 'DISABLED'2218kmi.properties.value_2 = 'ENABLED'2219kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS', alt=True)2220kmi.properties.data_path = 'tool_settings.proportional_edit'2221kmi.properties.value_1 = 'DISABLED'2222kmi.properties.value_2 = 'CONNECTED'2223# Map Armature2224km = kc.keymaps.new('Armature', space_type='EMPTY', region_type='WINDOW', modal=False)2225kmi = km.keymap_items.new('sketch.delete', 'X', 'PRESS')2226kmi = km.keymap_items.new('sketch.delete', 'DEL', 'PRESS')2227kmi = km.keymap_items.new('sketch.finish_stroke', 'RIGHTMOUSE', 'PRESS')2228kmi = km.keymap_items.new('sketch.cancel_stroke', 'ESC', 'PRESS')2229kmi = km.keymap_items.new('sketch.gesture', 'LEFTMOUSE', 'PRESS', shift=True)2230kmi = km.keymap_items.new('sketch.draw_stroke', 'LEFTMOUSE', 'PRESS')2231kmi = km.keymap_items.new('sketch.draw_stroke', 'LEFTMOUSE', 'PRESS', ctrl=True)2232kmi.properties.snap = True2233kmi = km.keymap_items.new('sketch.draw_preview', 'MOUSEMOVE', 'ANY')2234kmi = km.keymap_items.new('sketch.draw_preview', 'MOUSEMOVE', 'ANY', ctrl=True)2235kmi.properties.snap = True2236kmi = km.keymap_items.new('armature.hide', 'H', 'PRESS')2237kmi.properties.unselected = False2238kmi = km.keymap_items.new('armature.hide', 'H', 'PRESS', shift=True)2239kmi.properties.unselected = True2240kmi = km.keymap_items.new('armature.reveal', 'H', 'PRESS', alt=True)2241kmi = km.keymap_items.new('armature.align', 'A', 'PRESS', ctrl=True, alt=True)2242kmi = km.keymap_items.new('armature.calculate_roll', 'N', 'PRESS', ctrl=True)2243kmi = km.keymap_items.new('armature.switch_direction', 'F', 'PRESS', alt=True)2244kmi = km.keymap_items.new('armature.bone_primitive_add', 'A', 'PRESS', shift=True)2245kmi = km.keymap_items.new('armature.parent_set', 'P', 'PRESS', ctrl=True)2246kmi = km.keymap_items.new('armature.parent_clear', 'P', 'PRESS', alt=True)2247kmi = km.keymap_items.new('armature.select_all', 'LEFTMOUSE', 'CLICK')2248kmi.properties.action = 'TOGGLE'2249kmi = km.keymap_items.new('armature.select_all', 'I', 'PRESS', ctrl=True)2250kmi.properties.action = 'INVERT'2251kmi = km.keymap_items.new('armature.select_hierarchy', 'LEFT_BRACKET', 'PRESS')2252kmi.properties.direction = 'PARENT'2253kmi.properties.extend = False2254kmi = km.keymap_items.new('armature.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)2255kmi.properties.direction = 'PARENT'2256kmi.properties.extend = True2257kmi = km.keymap_items.new('armature.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')2258kmi.properties.direction = 'CHILD'2259kmi.properties.extend = False2260kmi = km.keymap_items.new('armature.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)2261kmi.properties.direction = 'CHILD'2262kmi.properties.extend = True2263kmi = km.keymap_items.new('armature.select_similar', 'G', 'PRESS', shift=True)2264kmi = km.keymap_items.new('armature.select_linked', 'L', 'PRESS')2265kmi = km.keymap_items.new('armature.delete', 'X', 'PRESS')2266kmi = km.keymap_items.new('armature.delete', 'DEL', 'PRESS')2267kmi = km.keymap_items.new('armature.duplicate_move', 'D', 'PRESS', shift=True)2268kmi = km.keymap_items.new('armature.extrude_move', 'E', 'PRESS')2269kmi = km.keymap_items.new('armature.extrude_forked', 'E', 'PRESS', shift=True)2270kmi = km.keymap_items.new('armature.click_extrude', 'LEFTMOUSE', 'CLICK', ctrl=True)2271kmi = km.keymap_items.new('armature.fill', 'F', 'PRESS', ctrl=True)2272kmi = km.keymap_items.new('armature.merge', 'M', 'PRESS', alt=True)2273kmi = km.keymap_items.new('armature.separate', 'P', 'PRESS', ctrl=True, alt=True)2274kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True)2275kmi.properties.name = 'VIEW3D_MT_bone_options_toggle'2276kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', shift=True, ctrl=True)2277kmi.properties.name = 'VIEW3D_MT_bone_options_enable'2278kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', alt=True)2279kmi.properties.name = 'VIEW3D_MT_bone_options_disable'2280kmi = km.keymap_items.new('armature.layers_show_all', 'ACCENT_GRAVE', 'PRESS', ctrl=True)2281kmi = km.keymap_items.new('armature.armature_layers', 'M', 'PRESS', shift=True)2282kmi = km.keymap_items.new('armature.bone_layers', 'M', 'PRESS')2283kmi = km.keymap_items.new('transform.transform', 'S', 'PRESS', ctrl=True, alt=True)2284kmi.properties.mode = 'BONE_SIZE'2285kmi = km.keymap_items.new('transform.transform', 'R', 'PRESS', ctrl=True)2286kmi.properties.mode = 'BONE_ROLL'2287kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS')2288kmi.properties.name = 'VIEW3D_MT_armature_specials'2289# Map Metaball2290km = kc.keymaps.new('Metaball', space_type='EMPTY', region_type='WINDOW', modal=False)2291kmi = km.keymap_items.new('object.metaball_add', 'A', 'PRESS', shift=True)2292kmi = km.keymap_items.new('mball.reveal_metaelems', 'H', 'PRESS', alt=True)2293kmi = km.keymap_items.new('mball.hide_metaelems', 'H', 'PRESS')2294kmi.properties.unselected = False2295kmi = km.keymap_items.new('mball.hide_metaelems', 'H', 'PRESS', shift=True)2296kmi.properties.unselected = True2297kmi = km.keymap_items.new('mball.delete_metaelems', 'X', 'PRESS')2298kmi = km.keymap_items.new('mball.delete_metaelems', 'DEL', 'PRESS')2299kmi = km.keymap_items.new('mball.duplicate_metaelems', 'D', 'PRESS', shift=True)2300kmi = km.keymap_items.new('mball.select_all', 'LEFTMOUSE', 'CLICK')2301kmi.properties.action = 'TOGGLE'2302kmi = km.keymap_items.new('mball.select_all', 'I', 'PRESS', ctrl=True)2303kmi.properties.action = 'INVERT'2304kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)2305kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'2306kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')2307kmi.properties.data_path = 'tool_settings.proportional_edit'2308kmi.properties.value_1 = 'DISABLED'2309kmi.properties.value_2 = 'ENABLED'2310kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS', alt=True)2311kmi.properties.data_path = 'tool_settings.proportional_edit'2312kmi.properties.value_1 = 'DISABLED'2313kmi.properties.value_2 = 'CONNECTED'2314# Map Lattice2315km = kc.keymaps.new('Lattice', space_type='EMPTY', region_type='WINDOW', modal=False)2316kmi = km.keymap_items.new('lattice.select_all', 'LEFTMOUSE', 'CLICK')2317kmi.properties.action = 'TOGGLE'2318kmi = km.keymap_items.new('lattice.select_all', 'I', 'PRESS', ctrl=True)2319kmi.properties.action = 'INVERT'2320kmi = km.keymap_items.new('object.vertex_parent_set', 'P', 'PRESS', ctrl=True)2321kmi = km.keymap_items.new('lattice.flip', 'F', 'PRESS', ctrl=True)2322kmi = km.keymap_items.new('wm.call_menu', 'H', 'PRESS', ctrl=True)2323kmi.properties.name = 'VIEW3D_MT_hook'2324kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)2325kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'2326kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')2327kmi.properties.data_path = 'tool_settings.proportional_edit'2328kmi.properties.value_1 = 'DISABLED'2329kmi.properties.value_2 = 'ENABLED'2330# Map Transform Modal Map2331km = kc.keymaps.new('Transform Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)2332kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)2333kmi = km.keymap_items.new_modal('CONFIRM', 'LEFTMOUSE', 'RELEASE', any=True)2334kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)2335kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS', any=True)2336kmi = km.keymap_items.new_modal('TRANSLATE', 'W', 'PRESS')2337kmi = km.keymap_items.new_modal('ROTATE', 'E', 'PRESS')2338kmi = km.keymap_items.new_modal('RESIZE', 'R', 'PRESS')2339kmi = km.keymap_items.new_modal('SNAP_TOGGLE', 'TAB', 'PRESS', shift=True)2340kmi = km.keymap_items.new_modal('SNAP_INV_ON', 'LEFT_CTRL', 'PRESS', any=True)2341kmi = km.keymap_items.new_modal('SNAP_INV_OFF', 'LEFT_CTRL', 'RELEASE', any=True)2342kmi = km.keymap_items.new_modal('SNAP_INV_ON', 'RIGHT_CTRL', 'PRESS', any=True)2343kmi = km.keymap_items.new_modal('SNAP_INV_OFF', 'RIGHT_CTRL', 'RELEASE', any=True)2344kmi = km.keymap_items.new_modal('ADD_SNAP', 'A', 'PRESS')2345kmi = km.keymap_items.new_modal('REMOVE_SNAP', 'A', 'PRESS', alt=True)2346kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_UP', 'PAGE_UP', 'PRESS')2347kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_DOWN', 'PAGE_DOWN', 'PRESS')2348kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_UP', 'WHEELDOWNMOUSE', 'PRESS')2349kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_DOWN', 'WHEELUPMOUSE', 'PRESS')2350kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE', 'TRACKPADPAN', 'ANY')2351kmi = km.keymap_items.new_modal('EDGESLIDE_EDGE_NEXT', 'WHEELDOWNMOUSE', 'PRESS', alt=True)2352kmi = km.keymap_items.new_modal('EDGESLIDE_PREV_NEXT', 'WHEELUPMOUSE', 'PRESS', alt=True)2353kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'PAGE_UP', 'PRESS', shift=True)2354kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'PAGE_DOWN', 'PRESS', shift=True)2355kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'WHEELDOWNMOUSE', 'PRESS', shift=True)2356kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'WHEELUPMOUSE', 'PRESS', shift=True)2357# Map View3D Gesture Circle2358km = kc.keymaps.new('View3D Gesture Circle', space_type='EMPTY', region_type='WINDOW', modal=True)2359kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)2360kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'ANY', any=True)2361kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'PRESS', any=True)2362kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'PRESS')2363kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'PRESS')2364kmi = km.keymap_items.new_modal('DESELECT', 'MIDDLEMOUSE', 'PRESS')2365kmi = km.keymap_items.new_modal('NOP', 'MIDDLEMOUSE', 'RELEASE')2366kmi = km.keymap_items.new_modal('NOP', 'LEFTMOUSE', 'RELEASE')2367kmi = km.keymap_items.new_modal('SUBTRACT', 'WHEELUPMOUSE', 'PRESS')2368kmi = km.keymap_items.new_modal('SUBTRACT', 'NUMPAD_MINUS', 'PRESS')2369kmi = km.keymap_items.new_modal('ADD', 'WHEELDOWNMOUSE', 'PRESS')2370kmi = km.keymap_items.new_modal('ADD', 'NUMPAD_PLUS', 'PRESS')2371kmi = km.keymap_items.new_modal('SIZE', 'TRACKPADPAN', 'ANY')2372# Map Gesture Border2373km = kc.keymaps.new('Gesture Border', space_type='EMPTY', region_type='WINDOW', modal=True)2374kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)2375kmi = km.keymap_items.new_modal('CANCEL', 'RIGHTMOUSE', 'PRESS', any=True)2376kmi = km.keymap_items.new_modal('BEGIN', 'LEFTMOUSE', 'PRESS')2377kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'RELEASE', any=True)2378kmi = km.keymap_items.new_modal('SELECT', 'RIGHTMOUSE', 'RELEASE', any=True)2379kmi = km.keymap_items.new_modal('BEGIN', 'MIDDLEMOUSE', 'PRESS')...
Touchable.js
Source:Touchable.js
1/**2 * Copyright (c) 2013-present, Facebook, Inc.3 *4 * This source code is licensed under the MIT license found in the5 * LICENSE file in the root directory of this source tree.6 *7 * @format8 */9'use strict';10const BoundingDimensions = require('BoundingDimensions');11const Platform = require('Platform');12const Position = require('Position');13const React = require('React');14const ReactNative = require('ReactNative');15const TVEventHandler = require('TVEventHandler');16const TouchEventUtils = require('fbjs/lib/TouchEventUtils');17const UIManager = require('UIManager');18const View = require('View');19const keyMirror = require('fbjs/lib/keyMirror');20const normalizeColor = require('normalizeColor');21/**22 * `Touchable`: Taps done right.23 *24 * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable`25 * will measure time/geometry and tells you when to give feedback to the user.26 *27 * ====================== Touchable Tutorial ===============================28 * The `Touchable` mixin helps you handle the "press" interaction. It analyzes29 * the geometry of elements, and observes when another responder (scroll view30 * etc) has stolen the touch lock. It notifies your component when it should31 * give feedback to the user. (bouncing/highlighting/unhighlighting).32 *33 * - When a touch was activated (typically you highlight)34 * - When a touch was deactivated (typically you unhighlight)35 * - When a touch was "pressed" - a touch ended while still within the geometry36 * of the element, and no other element (like scroller) has "stolen" touch37 * lock ("responder") (Typically you bounce the element).38 *39 * A good tap interaction isn't as simple as you might think. There should be a40 * slight delay before showing a highlight when starting a touch. If a41 * subsequent touch move exceeds the boundary of the element, it should42 * unhighlight, but if that same touch is brought back within the boundary, it43 * should rehighlight again. A touch can move in and out of that boundary44 * several times, each time toggling highlighting, but a "press" is only45 * triggered if that touch ends while within the element's boundary and no46 * scroller (or anything else) has stolen the lock on touches.47 *48 * To create a new type of component that handles interaction using the49 * `Touchable` mixin, do the following:50 *51 * - Initialize the `Touchable` state.52 *53 * getInitialState: function() {54 * return merge(this.touchableGetInitialState(), yourComponentState);55 * }56 *57 * - Choose the rendered component who's touches should start the interactive58 * sequence. On that rendered node, forward all `Touchable` responder59 * handlers. You can choose any rendered node you like. Choose a node whose60 * hit target you'd like to instigate the interaction sequence:61 *62 * // In render function:63 * return (64 * <View65 * onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}66 * onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest}67 * onResponderGrant={this.touchableHandleResponderGrant}68 * onResponderMove={this.touchableHandleResponderMove}69 * onResponderRelease={this.touchableHandleResponderRelease}70 * onResponderTerminate={this.touchableHandleResponderTerminate}>71 * <View>72 * Even though the hit detection/interactions are triggered by the73 * wrapping (typically larger) node, we usually end up implementing74 * custom logic that highlights this inner one.75 * </View>76 * </View>77 * );78 *79 * - You may set up your own handlers for each of these events, so long as you80 * also invoke the `touchable*` handlers inside of your custom handler.81 *82 * - Implement the handlers on your component class in order to provide83 * feedback to the user. See documentation for each of these class methods84 * that you should implement.85 *86 * touchableHandlePress: function() {87 * this.performBounceAnimation(); // or whatever you want to do.88 * },89 * touchableHandleActivePressIn: function() {90 * this.beginHighlighting(...); // Whatever you like to convey activation91 * },92 * touchableHandleActivePressOut: function() {93 * this.endHighlighting(...); // Whatever you like to convey deactivation94 * },95 *96 * - There are more advanced methods you can implement (see documentation below):97 * touchableGetHighlightDelayMS: function() {98 * return 20;99 * }100 * // In practice, *always* use a predeclared constant (conserve memory).101 * touchableGetPressRectOffset: function() {102 * return {top: 20, left: 20, right: 20, bottom: 100};103 * }104 */105/**106 * Touchable states.107 */108const States = keyMirror({109 NOT_RESPONDER: null, // Not the responder110 RESPONDER_INACTIVE_PRESS_IN: null, // Responder, inactive, in the `PressRect`111 RESPONDER_INACTIVE_PRESS_OUT: null, // Responder, inactive, out of `PressRect`112 RESPONDER_ACTIVE_PRESS_IN: null, // Responder, active, in the `PressRect`113 RESPONDER_ACTIVE_PRESS_OUT: null, // Responder, active, out of `PressRect`114 RESPONDER_ACTIVE_LONG_PRESS_IN: null, // Responder, active, in the `PressRect`, after long press threshold115 RESPONDER_ACTIVE_LONG_PRESS_OUT: null, // Responder, active, out of `PressRect`, after long press threshold116 ERROR: null,117});118/**119 * Quick lookup map for states that are considered to be "active"120 */121const IsActive = {122 RESPONDER_ACTIVE_PRESS_OUT: true,123 RESPONDER_ACTIVE_PRESS_IN: true,124};125/**126 * Quick lookup for states that are considered to be "pressing" and are127 * therefore eligible to result in a "selection" if the press stops.128 */129const IsPressingIn = {130 RESPONDER_INACTIVE_PRESS_IN: true,131 RESPONDER_ACTIVE_PRESS_IN: true,132 RESPONDER_ACTIVE_LONG_PRESS_IN: true,133};134const IsLongPressingIn = {135 RESPONDER_ACTIVE_LONG_PRESS_IN: true,136};137/**138 * Inputs to the state machine.139 */140const Signals = keyMirror({141 DELAY: null,142 RESPONDER_GRANT: null,143 RESPONDER_RELEASE: null,144 RESPONDER_TERMINATED: null,145 ENTER_PRESS_RECT: null,146 LEAVE_PRESS_RECT: null,147 LONG_PRESS_DETECTED: null,148});149/**150 * Mapping from States x Signals => States151 */152const Transitions = {153 NOT_RESPONDER: {154 DELAY: States.ERROR,155 RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,156 RESPONDER_RELEASE: States.ERROR,157 RESPONDER_TERMINATED: States.ERROR,158 ENTER_PRESS_RECT: States.ERROR,159 LEAVE_PRESS_RECT: States.ERROR,160 LONG_PRESS_DETECTED: States.ERROR,161 },162 RESPONDER_INACTIVE_PRESS_IN: {163 DELAY: States.RESPONDER_ACTIVE_PRESS_IN,164 RESPONDER_GRANT: States.ERROR,165 RESPONDER_RELEASE: States.NOT_RESPONDER,166 RESPONDER_TERMINATED: States.NOT_RESPONDER,167 ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,168 LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,169 LONG_PRESS_DETECTED: States.ERROR,170 },171 RESPONDER_INACTIVE_PRESS_OUT: {172 DELAY: States.RESPONDER_ACTIVE_PRESS_OUT,173 RESPONDER_GRANT: States.ERROR,174 RESPONDER_RELEASE: States.NOT_RESPONDER,175 RESPONDER_TERMINATED: States.NOT_RESPONDER,176 ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,177 LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,178 LONG_PRESS_DETECTED: States.ERROR,179 },180 RESPONDER_ACTIVE_PRESS_IN: {181 DELAY: States.ERROR,182 RESPONDER_GRANT: States.ERROR,183 RESPONDER_RELEASE: States.NOT_RESPONDER,184 RESPONDER_TERMINATED: States.NOT_RESPONDER,185 ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,186 LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,187 LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN,188 },189 RESPONDER_ACTIVE_PRESS_OUT: {190 DELAY: States.ERROR,191 RESPONDER_GRANT: States.ERROR,192 RESPONDER_RELEASE: States.NOT_RESPONDER,193 RESPONDER_TERMINATED: States.NOT_RESPONDER,194 ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,195 LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,196 LONG_PRESS_DETECTED: States.ERROR,197 },198 RESPONDER_ACTIVE_LONG_PRESS_IN: {199 DELAY: States.ERROR,200 RESPONDER_GRANT: States.ERROR,201 RESPONDER_RELEASE: States.NOT_RESPONDER,202 RESPONDER_TERMINATED: States.NOT_RESPONDER,203 ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,204 LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,205 LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN,206 },207 RESPONDER_ACTIVE_LONG_PRESS_OUT: {208 DELAY: States.ERROR,209 RESPONDER_GRANT: States.ERROR,210 RESPONDER_RELEASE: States.NOT_RESPONDER,211 RESPONDER_TERMINATED: States.NOT_RESPONDER,212 ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,213 LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,214 LONG_PRESS_DETECTED: States.ERROR,215 },216 error: {217 DELAY: States.NOT_RESPONDER,218 RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,219 RESPONDER_RELEASE: States.NOT_RESPONDER,220 RESPONDER_TERMINATED: States.NOT_RESPONDER,221 ENTER_PRESS_RECT: States.NOT_RESPONDER,222 LEAVE_PRESS_RECT: States.NOT_RESPONDER,223 LONG_PRESS_DETECTED: States.NOT_RESPONDER,224 },225};226// ==== Typical Constants for integrating into UI components ====227// var HIT_EXPAND_PX = 20;228// var HIT_VERT_OFFSET_PX = 10;229const HIGHLIGHT_DELAY_MS = 130;230const PRESS_EXPAND_PX = 20;231const LONG_PRESS_THRESHOLD = 500;232const LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS;233const LONG_PRESS_ALLOWED_MOVEMENT = 10;234// Default amount "active" region protrudes beyond box235/**236 * By convention, methods prefixed with underscores are meant to be @private,237 * and not @protected. Mixers shouldn't access them - not even to provide them238 * as callback handlers.239 *240 *241 * ========== Geometry =========242 * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect`243 * is an abstract box that is extended beyond the `HitRect`.244 *245 * +--------------------------+246 * | | - "Start" events in `HitRect` cause `HitRect`247 * | +--------------------+ | to become the responder.248 * | | +--------------+ | | - `HitRect` is typically expanded around249 * | | | | | | the `VisualRect`, but shifted downward.250 * | | | VisualRect | | | - After pressing down, after some delay,251 * | | | | | | and before letting up, the Visual React252 * | | +--------------+ | | will become "active". This makes it eligible253 * | | HitRect | | for being highlighted (so long as the254 * | +--------------------+ | press remains in the `PressRect`).255 * | PressRect o |256 * +----------------------|---+257 * Out Region |258 * +-----+ This gap between the `HitRect` and259 * `PressRect` allows a touch to move far away260 * from the original hit rect, and remain261 * highlighted, and eligible for a "Press".262 * Customize this via263 * `touchableGetPressRectOffset()`.264 *265 *266 *267 * ======= State Machine =======268 *269 * +-------------+ <---+ RESPONDER_RELEASE270 * |NOT_RESPONDER|271 * +-------------+ <---+ RESPONDER_TERMINATED272 * +273 * | RESPONDER_GRANT (HitRect)274 * v275 * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+276 * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN|277 * +---------------------------+ +-------------------------+ +------------------------------+278 * + ^ + ^ + ^279 * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_280 * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT281 * | | | | | |282 * v + v + v +283 * +----------------------------+ DELAY +--------------------------+ +-------------------------------+284 * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT|285 * +----------------------------+ +--------------------------+ +-------------------------------+286 *287 * T + DELAY => LONG_PRESS_DELAY_MS + DELAY288 *289 * Not drawn are the side effects of each transition. The most important side290 * effect is the `touchableHandlePress` abstract method invocation that occurs291 * when a responder is released while in either of the "Press" states.292 *293 * The other important side effects are the highlight abstract method294 * invocations (internal callbacks) to be implemented by the mixer.295 *296 *297 * @lends Touchable.prototype298 */299const TouchableMixin = {300 componentDidMount: function() {301 if (!Platform.isTV) {302 return;303 }304 this._tvEventHandler = new TVEventHandler();305 this._tvEventHandler.enable(this, function(cmp, evt) {306 const myTag = ReactNative.findNodeHandle(cmp);307 evt.dispatchConfig = {};308 if (myTag === evt.tag) {309 if (evt.eventType === 'focus') {310 cmp.touchableHandleFocus(evt);311 } else if (evt.eventType === 'blur') {312 cmp.touchableHandleBlur(evt);313 } else if (evt.eventType === 'select') {314 cmp.touchableHandlePress &&315 !cmp.props.disabled &&316 cmp.touchableHandlePress(evt);317 }318 }319 });320 },321 /**322 * Clear all timeouts on unmount323 */324 componentWillUnmount: function() {325 if (this._tvEventHandler) {326 this._tvEventHandler.disable();327 delete this._tvEventHandler;328 }329 this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);330 this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);331 this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);332 },333 /**334 * It's prefer that mixins determine state in this way, having the class335 * explicitly mix the state in the one and only `getInitialState` method.336 *337 * @return {object} State object to be placed inside of338 * `this.state.touchable`.339 */340 touchableGetInitialState: function() {341 return {342 touchable: {touchState: undefined, responderID: null},343 };344 },345 // ==== Hooks to Gesture Responder system ====346 /**347 * Must return true if embedded in a native platform scroll view.348 */349 touchableHandleResponderTerminationRequest: function() {350 return !this.props.rejectResponderTermination;351 },352 /**353 * Must return true to start the process of `Touchable`.354 */355 touchableHandleStartShouldSetResponder: function() {356 return !this.props.disabled;357 },358 /**359 * Return true to cancel press on long press.360 */361 touchableLongPressCancelsPress: function() {362 return true;363 },364 /**365 * Place as callback for a DOM element's `onResponderGrant` event.366 * @param {SyntheticEvent} e Synthetic event from event system.367 *368 */369 touchableHandleResponderGrant: function(e) {370 const dispatchID = e.currentTarget;371 // Since e is used in a callback invoked on another event loop372 // (as in setTimeout etc), we need to call e.persist() on the373 // event to make sure it doesn't get reused in the event object pool.374 e.persist();375 this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);376 this.pressOutDelayTimeout = null;377 this.state.touchable.touchState = States.NOT_RESPONDER;378 this.state.touchable.responderID = dispatchID;379 this._receiveSignal(Signals.RESPONDER_GRANT, e);380 let delayMS =381 this.touchableGetHighlightDelayMS !== undefined382 ? Math.max(this.touchableGetHighlightDelayMS(), 0)383 : HIGHLIGHT_DELAY_MS;384 delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS;385 if (delayMS !== 0) {386 this.touchableDelayTimeout = setTimeout(387 this._handleDelay.bind(this, e),388 delayMS,389 );390 } else {391 this._handleDelay(e);392 }393 let longDelayMS =394 this.touchableGetLongPressDelayMS !== undefined395 ? Math.max(this.touchableGetLongPressDelayMS(), 10)396 : LONG_PRESS_DELAY_MS;397 longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS;398 this.longPressDelayTimeout = setTimeout(399 this._handleLongDelay.bind(this, e),400 longDelayMS + delayMS,401 );402 },403 /**404 * Place as callback for a DOM element's `onResponderRelease` event.405 */406 touchableHandleResponderRelease: function(e) {407 this._receiveSignal(Signals.RESPONDER_RELEASE, e);408 },409 /**410 * Place as callback for a DOM element's `onResponderTerminate` event.411 */412 touchableHandleResponderTerminate: function(e) {413 this._receiveSignal(Signals.RESPONDER_TERMINATED, e);414 },415 /**416 * Place as callback for a DOM element's `onResponderMove` event.417 */418 touchableHandleResponderMove: function(e) {419 // Not enough time elapsed yet, wait for highlight -420 // this is just a perf optimization.421 if (422 this.state.touchable.touchState === States.RESPONDER_INACTIVE_PRESS_IN423 ) {424 return;425 }426 // Measurement may not have returned yet.427 if (!this.state.touchable.positionOnActivate) {428 return;429 }430 const positionOnActivate = this.state.touchable.positionOnActivate;431 const dimensionsOnActivate = this.state.touchable.dimensionsOnActivate;432 const pressRectOffset = this.touchableGetPressRectOffset433 ? this.touchableGetPressRectOffset()434 : {435 left: PRESS_EXPAND_PX,436 right: PRESS_EXPAND_PX,437 top: PRESS_EXPAND_PX,438 bottom: PRESS_EXPAND_PX,439 };440 let pressExpandLeft = pressRectOffset.left;441 let pressExpandTop = pressRectOffset.top;442 let pressExpandRight = pressRectOffset.right;443 let pressExpandBottom = pressRectOffset.bottom;444 const hitSlop = this.touchableGetHitSlop445 ? this.touchableGetHitSlop()446 : null;447 if (hitSlop) {448 pressExpandLeft += hitSlop.left;449 pressExpandTop += hitSlop.top;450 pressExpandRight += hitSlop.right;451 pressExpandBottom += hitSlop.bottom;452 }453 const touch = TouchEventUtils.extractSingleTouch(e.nativeEvent);454 const pageX = touch && touch.pageX;455 const pageY = touch && touch.pageY;456 if (this.pressInLocation) {457 const movedDistance = this._getDistanceBetweenPoints(458 pageX,459 pageY,460 this.pressInLocation.pageX,461 this.pressInLocation.pageY,462 );463 if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) {464 this._cancelLongPressDelayTimeout();465 }466 }467 const isTouchWithinActive =468 pageX > positionOnActivate.left - pressExpandLeft &&469 pageY > positionOnActivate.top - pressExpandTop &&470 pageX <471 positionOnActivate.left +472 dimensionsOnActivate.width +473 pressExpandRight &&474 pageY <475 positionOnActivate.top +476 dimensionsOnActivate.height +477 pressExpandBottom;478 if (isTouchWithinActive) {479 this._receiveSignal(Signals.ENTER_PRESS_RECT, e);480 const curState = this.state.touchable.touchState;481 if (curState === States.RESPONDER_INACTIVE_PRESS_IN) {482 // fix for t7967420483 this._cancelLongPressDelayTimeout();484 }485 } else {486 this._cancelLongPressDelayTimeout();487 this._receiveSignal(Signals.LEAVE_PRESS_RECT, e);488 }489 },490 /**491 * Invoked when the item receives focus. Mixers might override this to492 * visually distinguish the `VisualRect` so that the user knows that it493 * currently has the focus. Most platforms only support a single element being494 * focused at a time, in which case there may have been a previously focused495 * element that was blurred just prior to this.496 */497 touchableHandleFocus: function(e: Event) {498 this.props.onFocus && this.props.onFocus(e);499 },500 /**501 * Invoked when the item loses focus. Mixers might override this to502 * visually distinguish the `VisualRect` so that the user knows that it503 * no longer has focus. Most platforms only support a single element being504 * focused at a time, in which case the focus may have moved to another.505 */506 touchableHandleBlur: function(e: Event) {507 this.props.onBlur && this.props.onBlur(e);508 },509 // ==== Abstract Application Callbacks ====510 /**511 * Invoked when the item should be highlighted. Mixers should implement this512 * to visually distinguish the `VisualRect` so that the user knows that513 * releasing a touch will result in a "selection" (analog to click).514 *515 * @abstract516 * touchableHandleActivePressIn: function,517 */518 /**519 * Invoked when the item is "active" (in that it is still eligible to become520 * a "select") but the touch has left the `PressRect`. Usually the mixer will521 * want to unhighlight the `VisualRect`. If the user (while pressing) moves522 * back into the `PressRect` `touchableHandleActivePressIn` will be invoked523 * again and the mixer should probably highlight the `VisualRect` again. This524 * event will not fire on an `touchEnd/mouseUp` event, only move events while525 * the user is depressing the mouse/touch.526 *527 * @abstract528 * touchableHandleActivePressOut: function529 */530 /**531 * Invoked when the item is "selected" - meaning the interaction ended by532 * letting up while the item was either in the state533 * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`.534 *535 * @abstract536 * touchableHandlePress: function537 */538 /**539 * Invoked when the item is long pressed - meaning the interaction ended by540 * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If541 * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will542 * be called as it normally is. If `touchableHandleLongPress` is provided, by543 * default any `touchableHandlePress` callback will not be invoked. To544 * override this default behavior, override `touchableLongPressCancelsPress`545 * to return false. As a result, `touchableHandlePress` will be called when546 * lifting up, even if `touchableHandleLongPress` has also been called.547 *548 * @abstract549 * touchableHandleLongPress: function550 */551 /**552 * Returns the number of millis to wait before triggering a highlight.553 *554 * @abstract555 * touchableGetHighlightDelayMS: function556 */557 /**558 * Returns the amount to extend the `HitRect` into the `PressRect`. Positive559 * numbers mean the size expands outwards.560 *561 * @abstract562 * touchableGetPressRectOffset: function563 */564 // ==== Internal Logic ====565 /**566 * Measures the `HitRect` node on activation. The Bounding rectangle is with567 * respect to viewport - not page, so adding the `pageXOffset/pageYOffset`568 * should result in points that are in the same coordinate system as an569 * event's `globalX/globalY` data values.570 *571 * - Consider caching this for the lifetime of the component, or possibly572 * being able to share this cache between any `ScrollMap` view.573 *574 * @sideeffects575 * @private576 */577 _remeasureMetricsOnActivation: function() {578 const tag = this.state.touchable.responderID;579 if (tag == null) {580 return;581 }582 UIManager.measure(tag, this._handleQueryLayout);583 },584 _handleQueryLayout: function(l, t, w, h, globalX, globalY) {585 //don't do anything UIManager failed to measure node586 if (!l && !t && !w && !h && !globalX && !globalY) {587 return;588 }589 this.state.touchable.positionOnActivate &&590 Position.release(this.state.touchable.positionOnActivate);591 this.state.touchable.dimensionsOnActivate &&592 BoundingDimensions.release(this.state.touchable.dimensionsOnActivate);593 this.state.touchable.positionOnActivate = Position.getPooled(594 globalX,595 globalY,596 );597 this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(598 w,599 h,600 );601 },602 _handleDelay: function(e) {603 this.touchableDelayTimeout = null;604 this._receiveSignal(Signals.DELAY, e);605 },606 _handleLongDelay: function(e) {607 this.longPressDelayTimeout = null;608 const curState = this.state.touchable.touchState;609 if (610 curState !== States.RESPONDER_ACTIVE_PRESS_IN &&611 curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN612 ) {613 console.error(614 'Attempted to transition from state `' +615 curState +616 '` to `' +617 States.RESPONDER_ACTIVE_LONG_PRESS_IN +618 '`, which is not supported. This is ' +619 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.',620 );621 } else {622 this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);623 }624 },625 /**626 * Receives a state machine signal, performs side effects of the transition627 * and stores the new state. Validates the transition as well.628 *629 * @param {Signals} signal State machine signal.630 * @throws Error if invalid state transition or unrecognized signal.631 * @sideeffects632 */633 _receiveSignal: function(signal, e) {634 const responderID = this.state.touchable.responderID;635 const curState = this.state.touchable.touchState;636 const nextState = Transitions[curState] && Transitions[curState][signal];637 if (!responderID && signal === Signals.RESPONDER_RELEASE) {638 return;639 }640 if (!nextState) {641 throw new Error(642 'Unrecognized signal `' +643 signal +644 '` or state `' +645 curState +646 '` for Touchable responder `' +647 responderID +648 '`',649 );650 }651 if (nextState === States.ERROR) {652 throw new Error(653 'Touchable cannot transition from `' +654 curState +655 '` to `' +656 signal +657 '` for responder `' +658 responderID +659 '`',660 );661 }662 if (curState !== nextState) {663 this._performSideEffectsForTransition(curState, nextState, signal, e);664 this.state.touchable.touchState = nextState;665 }666 },667 _cancelLongPressDelayTimeout: function() {668 this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);669 this.longPressDelayTimeout = null;670 },671 _isHighlight: function(state) {672 return (673 state === States.RESPONDER_ACTIVE_PRESS_IN ||674 state === States.RESPONDER_ACTIVE_LONG_PRESS_IN675 );676 },677 _savePressInLocation: function(e) {678 const touch = TouchEventUtils.extractSingleTouch(e.nativeEvent);679 const pageX = touch && touch.pageX;680 const pageY = touch && touch.pageY;681 const locationX = touch && touch.locationX;682 const locationY = touch && touch.locationY;683 this.pressInLocation = {pageX, pageY, locationX, locationY};684 },685 _getDistanceBetweenPoints: function(aX, aY, bX, bY) {686 const deltaX = aX - bX;687 const deltaY = aY - bY;688 return Math.sqrt(deltaX * deltaX + deltaY * deltaY);689 },690 /**691 * Will perform a transition between touchable states, and identify any692 * highlighting or unhighlighting that must be performed for this particular693 * transition.694 *695 * @param {States} curState Current Touchable state.696 * @param {States} nextState Next Touchable state.697 * @param {Signal} signal Signal that triggered the transition.698 * @param {Event} e Native event.699 * @sideeffects700 */701 _performSideEffectsForTransition: function(curState, nextState, signal, e) {702 const curIsHighlight = this._isHighlight(curState);703 const newIsHighlight = this._isHighlight(nextState);704 const isFinalSignal =705 signal === Signals.RESPONDER_TERMINATED ||706 signal === Signals.RESPONDER_RELEASE;707 if (isFinalSignal) {708 this._cancelLongPressDelayTimeout();709 }710 if (!IsActive[curState] && IsActive[nextState]) {711 this._remeasureMetricsOnActivation();712 }713 if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) {714 this.touchableHandleLongPress && this.touchableHandleLongPress(e);715 }716 if (newIsHighlight && !curIsHighlight) {717 this._startHighlight(e);718 } else if (!newIsHighlight && curIsHighlight) {719 this._endHighlight(e);720 }721 if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) {722 const hasLongPressHandler = !!this.props.onLongPress;723 const pressIsLongButStillCallOnPress =724 IsLongPressingIn[curState] && // We *are* long pressing.. // But either has no long handler725 (!hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it.726 const shouldInvokePress =727 !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress;728 if (shouldInvokePress && this.touchableHandlePress) {729 if (!newIsHighlight && !curIsHighlight) {730 // we never highlighted because of delay, but we should highlight now731 this._startHighlight(e);732 this._endHighlight(e);733 }734 if (Platform.OS === 'android') {735 this._playTouchSound();736 }737 this.touchableHandlePress(e);738 }739 }740 this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);741 this.touchableDelayTimeout = null;742 },743 _playTouchSound: function() {744 UIManager.playTouchSound();745 },746 _startHighlight: function(e) {747 this._savePressInLocation(e);748 this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);749 },750 _endHighlight: function(e) {751 if (this.touchableHandleActivePressOut) {752 if (753 this.touchableGetPressOutDelayMS &&754 this.touchableGetPressOutDelayMS()755 ) {756 this.pressOutDelayTimeout = setTimeout(() => {757 this.touchableHandleActivePressOut(e);758 }, this.touchableGetPressOutDelayMS());759 } else {760 this.touchableHandleActivePressOut(e);761 }762 }763 },764};765const Touchable = {766 Mixin: TouchableMixin,767 TOUCH_TARGET_DEBUG: false, // Highlights all touchable targets. Toggle with Inspector.768 /**769 * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android).770 */771 renderDebugView: ({color, hitSlop}) => {772 if (!Touchable.TOUCH_TARGET_DEBUG) {773 return null;774 }775 if (!__DEV__) {776 throw Error(777 'Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!',778 );779 }780 const debugHitSlopStyle = {};781 hitSlop = hitSlop || {top: 0, bottom: 0, left: 0, right: 0};782 for (const key in hitSlop) {783 debugHitSlopStyle[key] = -hitSlop[key];784 }785 const hexColor =786 '#' + ('00000000' + normalizeColor(color).toString(16)).substr(-8);787 return (788 <View789 pointerEvents="none"790 style={{791 position: 'absolute',792 borderColor: hexColor.slice(0, -2) + '55', // More opaque793 borderWidth: 1,794 borderStyle: 'dashed',795 backgroundColor: hexColor.slice(0, -2) + '0F', // Less opaque796 ...debugHitSlopStyle,797 }}798 />799 );800 },801};...
maya.py
Source:maya.py
1# Configuration Maya2import bpy3wm = bpy.context.window_manager4kc = wm.keyconfigs.new('maya')5# Map 3D View6km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)7kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)8kmi.properties.release_confirm = True9kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')10kmi = km.keymap_items.new('view3d.rotate', 'LEFTMOUSE', 'PRESS', alt=True)11kmi = km.keymap_items.new('view3d.move', 'MIDDLEMOUSE', 'PRESS', alt=True)12kmi = km.keymap_items.new('view3d.zoom', 'RIGHTMOUSE', 'PRESS', alt=True)13kmi = km.keymap_items.new('view3d.view_selected', 'NUMPAD_PERIOD', 'PRESS')14kmi = km.keymap_items.new('view3d.view_center_cursor', 'NUMPAD_PERIOD', 'PRESS', ctrl=True)15kmi = km.keymap_items.new('view3d.fly', 'F', 'PRESS', shift=True)16kmi = km.keymap_items.new('view3d.smoothview', 'TIMER1', 'ANY', any=True)17kmi = km.keymap_items.new('view3d.rotate', 'TRACKPADPAN', 'ANY', alt=True)18kmi = km.keymap_items.new('view3d.rotate', 'MOUSEROTATE', 'ANY')19kmi = km.keymap_items.new('view3d.move', 'TRACKPADPAN', 'ANY')20kmi = km.keymap_items.new('view3d.zoom', 'TRACKPADZOOM', 'ANY')21kmi = km.keymap_items.new('view3d.zoom', 'NUMPAD_PLUS', 'PRESS')22kmi.properties.delta = 123kmi = km.keymap_items.new('view3d.zoom', 'NUMPAD_MINUS', 'PRESS')24kmi.properties.delta = -125kmi = km.keymap_items.new('view3d.zoom', 'EQUAL', 'PRESS', ctrl=True)26kmi.properties.delta = 127kmi = km.keymap_items.new('view3d.zoom', 'MINUS', 'PRESS', ctrl=True)28kmi.properties.delta = -129kmi = km.keymap_items.new('view3d.zoom', 'WHEELINMOUSE', 'PRESS')30kmi.properties.delta = 131kmi = km.keymap_items.new('view3d.zoom', 'WHEELOUTMOUSE', 'PRESS')32kmi.properties.delta = -133kmi = km.keymap_items.new('view3d.view_all', 'HOME', 'PRESS')34kmi.properties.center = False35kmi = km.keymap_items.new('view3d.view_all', 'C', 'PRESS', shift=True)36kmi.properties.center = True37kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_0', 'PRESS')38kmi.properties.type = 'CAMERA'39kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'PRESS')40kmi.properties.type = 'FRONT'41kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_2', 'PRESS')42kmi.properties.type = 'ORBITDOWN'43kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'PRESS')44kmi.properties.type = 'RIGHT'45kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_4', 'PRESS')46kmi.properties.type = 'ORBITLEFT'47kmi = km.keymap_items.new('view3d.view_persportho', 'NUMPAD_5', 'PRESS')48kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_6', 'PRESS')49kmi.properties.type = 'ORBITRIGHT'50kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'PRESS')51kmi.properties.type = 'TOP'52kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_8', 'PRESS')53kmi.properties.type = 'ORBITUP'54kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', ctrl=True)55kmi.properties.type = 'BACK'56kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', ctrl=True)57kmi.properties.type = 'LEFT'58kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', ctrl=True)59kmi.properties.type = 'BOTTOM'60kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_2', 'PRESS', ctrl=True)61kmi.properties.type = 'PANDOWN'62kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_4', 'PRESS', ctrl=True)63kmi.properties.type = 'PANLEFT'64kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_6', 'PRESS', ctrl=True)65kmi.properties.type = 'PANRIGHT'66kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_8', 'PRESS', ctrl=True)67kmi.properties.type = 'PANUP'68kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', ctrl=True)69kmi.properties.type = 'PANRIGHT'70kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)71kmi.properties.type = 'PANLEFT'72kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', shift=True)73kmi.properties.type = 'PANUP'74kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', shift=True)75kmi.properties.type = 'PANDOWN'76kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', ctrl=True, alt=True)77kmi.properties.type = 'ORBITLEFT'78kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True, alt=True)79kmi.properties.type = 'ORBITRIGHT'80kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', shift=True, alt=True)81kmi.properties.type = 'ORBITUP'82kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', shift=True, alt=True)83kmi.properties.type = 'ORBITDOWN'84kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', shift=True)85kmi.properties.align_active = True86kmi.properties.type = 'FRONT'87kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', shift=True)88kmi.properties.align_active = True89kmi.properties.type = 'RIGHT'90kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', shift=True)91kmi.properties.align_active = True92kmi.properties.type = 'TOP'93kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', shift=True, ctrl=True)94kmi.properties.align_active = True95kmi.properties.type = 'BACK'96kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', shift=True, ctrl=True)97kmi.properties.align_active = True98kmi.properties.type = 'LEFT'99kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', shift=True, ctrl=True)100kmi.properties.align_active = True101kmi.properties.type = 'BOTTOM'102kmi = km.keymap_items.new('view3d.localview', 'NUMPAD_SLASH', 'PRESS')103kmi = km.keymap_items.new('view3d.layers', 'ACCENT_GRAVE', 'PRESS')104kmi.properties.nr = 0105kmi = km.keymap_items.new('view3d.layers', 'ONE', 'PRESS', any=True)106kmi.properties.nr = 1107kmi = km.keymap_items.new('view3d.layers', 'TWO', 'PRESS', any=True)108kmi.properties.nr = 2109kmi = km.keymap_items.new('view3d.layers', 'THREE', 'PRESS', any=True)110kmi.properties.nr = 3111kmi = km.keymap_items.new('view3d.layers', 'FOUR', 'PRESS', any=True)112kmi.properties.nr = 4113kmi = km.keymap_items.new('view3d.layers', 'FIVE', 'PRESS', any=True)114kmi.properties.nr = 5115kmi = km.keymap_items.new('view3d.layers', 'SIX', 'PRESS', any=True)116kmi.properties.nr = 6117kmi = km.keymap_items.new('view3d.layers', 'SEVEN', 'PRESS', any=True)118kmi.properties.nr = 7119kmi = km.keymap_items.new('view3d.layers', 'EIGHT', 'PRESS', any=True)120kmi.properties.nr = 8121kmi = km.keymap_items.new('view3d.layers', 'NINE', 'PRESS', any=True)122kmi.properties.nr = 9123kmi = km.keymap_items.new('view3d.layers', 'ZERO', 'PRESS', any=True)124kmi.properties.nr = 10125kmi = km.keymap_items.new('wm.context_toggle_enum', 'Z', 'PRESS')126kmi.properties.data_path = 'space_data.viewport_shade'127kmi.properties.value_1 = 'SOLID'128kmi.properties.value_2 = 'WIREFRAME'129kmi = km.keymap_items.new('wm.context_toggle_enum', 'Z', 'PRESS', alt=True)130kmi.properties.data_path = 'space_data.viewport_shade'131kmi.properties.value_1 = 'TEXTURED'132kmi.properties.value_2 = 'SOLID'133kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS')134kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True)135kmi.properties.extend = True136kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', ctrl=True)137kmi.properties.center = True138kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', alt=True)139kmi.properties.enumerate = True140kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)141kmi.properties.center = True142kmi.properties.extend = True143kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)144kmi.properties.center = True145kmi.properties.enumerate = True146kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)147kmi.properties.enumerate = True148kmi.properties.extend = True149kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)150kmi.properties.center = True151kmi.properties.enumerate = True152kmi.properties.extend = True153kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_S', 'ANY')154kmi.properties.extend = False155kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)156kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)157kmi.properties.deselect = True158kmi = km.keymap_items.new('view3d.select_circle', 'C', 'PRESS')159kmi = km.keymap_items.new('view3d.clip_border', 'B', 'PRESS', alt=True)160kmi = km.keymap_items.new('view3d.zoom_border', 'B', 'PRESS', shift=True)161kmi = km.keymap_items.new('view3d.render_border', 'B', 'PRESS', shift=True)162kmi = km.keymap_items.new('view3d.camera_to_view', 'NUMPAD_0', 'PRESS', ctrl=True, alt=True)163kmi = km.keymap_items.new('view3d.object_as_camera', 'NUMPAD_0', 'PRESS', ctrl=True)164kmi = km.keymap_items.new('wm.call_menu', 'S', 'PRESS', shift=True)165kmi.properties.name = 'VIEW3D_MT_snap'166kmi = km.keymap_items.new('wm.context_set_enum', 'COMMA', 'PRESS')167kmi.properties.data_path = 'space_data.pivot_point'168kmi.properties.value = 'BOUNDING_BOX_CENTER'169kmi = km.keymap_items.new('wm.context_set_enum', 'COMMA', 'PRESS', ctrl=True)170kmi.properties.data_path = 'space_data.pivot_point'171kmi.properties.value = 'MEDIAN_POINT'172kmi = km.keymap_items.new('wm.context_toggle', 'COMMA', 'PRESS', alt=True)173kmi.properties.data_path = 'space_data.use_pivot_point'174kmi = km.keymap_items.new('wm.context_toggle', 'Q', 'PRESS')175kmi.properties.data_path = 'space_data.show_manipulator'176kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'PRESS')177kmi.properties.data_path = 'space_data.pivot_point'178kmi.properties.value = 'CURSOR'179kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'PRESS', ctrl=True)180kmi.properties.data_path = 'space_data.pivot_point'181kmi.properties.value = 'INDIVIDUAL_ORIGINS'182kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'PRESS', alt=True)183kmi.properties.data_path = 'space_data.pivot_point'184kmi.properties.value = 'ACTIVE_ELEMENT'185kmi = km.keymap_items.new('transform.translate', 'G', 'PRESS', shift=True)186kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')187kmi = km.keymap_items.new('transform.rotate', 'R', 'PRESS', shift=True)188kmi = km.keymap_items.new('transform.resize', 'S', 'PRESS', shift=True)189kmi = km.keymap_items.new('transform.warp', 'W', 'PRESS', shift=True)190kmi = km.keymap_items.new('transform.tosphere', 'S', 'PRESS', shift=True, alt=True)191kmi = km.keymap_items.new('transform.shear', 'S', 'PRESS', shift=True, ctrl=True, alt=True)192kmi = km.keymap_items.new('transform.select_orientation', 'SPACE', 'PRESS', alt=True)193kmi = km.keymap_items.new('transform.create_orientation', 'SPACE', 'PRESS', ctrl=True, alt=True)194kmi.properties.use = True195kmi = km.keymap_items.new('transform.mirror', 'M', 'PRESS', ctrl=True)196kmi = km.keymap_items.new('wm.context_toggle', 'TAB', 'PRESS', shift=True)197kmi.properties.data_path = 'tool_settings.use_snap'198kmi = km.keymap_items.new('transform.snap_type', 'TAB', 'PRESS', shift=True, ctrl=True)199kmi = km.keymap_items.new('view3d.enable_manipulator', 'W', 'PRESS')200kmi.properties.translate = True201kmi = km.keymap_items.new('view3d.enable_manipulator', 'E', 'PRESS')202kmi.properties.rotate = True203kmi = km.keymap_items.new('view3d.enable_manipulator', 'R', 'PRESS')204kmi.properties.scale = True205kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_S', 'ANY', shift=True)206kmi.properties.extend = True207# Map Object Mode208km = kc.keymaps.new('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)209kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)210kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'211kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')212kmi.properties.data_path = 'tool_settings.proportional_edit'213kmi.properties.value_1 = 'DISABLED'214kmi.properties.value_2 = 'ENABLED'215kmi = km.keymap_items.new('view3d.game_start', 'P', 'PRESS')216kmi = km.keymap_items.new('object.select_all', 'A', 'PRESS')217kmi = km.keymap_items.new('object.select_inverse', 'I', 'PRESS', ctrl=True)218kmi = km.keymap_items.new('object.select_linked', 'L', 'PRESS', shift=True)219kmi = km.keymap_items.new('object.select_grouped', 'G', 'PRESS', shift=True)220kmi = km.keymap_items.new('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)221kmi = km.keymap_items.new('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS')222kmi.properties.direction = 'PARENT'223kmi = km.keymap_items.new('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)224kmi.properties.direction = 'PARENT'225kmi.properties.extend = True226kmi = km.keymap_items.new('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')227kmi.properties.direction = 'CHILD'228kmi = km.keymap_items.new('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)229kmi.properties.direction = 'CHILD'230kmi.properties.extend = True231kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS', ctrl=True)232kmi = km.keymap_items.new('object.parent_no_inverse_set', 'P', 'PRESS', shift=True, ctrl=True)233kmi = km.keymap_items.new('object.parent_clear', 'P', 'PRESS', alt=True)234kmi = km.keymap_items.new('object.track_set', 'T', 'PRESS', ctrl=True)235kmi = km.keymap_items.new('object.track_clear', 'T', 'PRESS', alt=True)236kmi = km.keymap_items.new('object.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)237kmi = km.keymap_items.new('object.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)238kmi = km.keymap_items.new('object.location_clear', 'G', 'PRESS', alt=True)239kmi = km.keymap_items.new('object.rotation_clear', 'R', 'PRESS', alt=True)240kmi = km.keymap_items.new('object.scale_clear', 'S', 'PRESS', alt=True)241kmi = km.keymap_items.new('object.origin_clear', 'O', 'PRESS', alt=True)242kmi = km.keymap_items.new('object.hide_view_clear', 'H', 'PRESS', alt=True)243kmi = km.keymap_items.new('object.hide_view_set', 'H', 'PRESS')244kmi = km.keymap_items.new('object.hide_view_set', 'H', 'PRESS', shift=True)245kmi.properties.unselected = True246kmi = km.keymap_items.new('object.move_to_layer', 'M', 'PRESS')247kmi = km.keymap_items.new('object.delete', 'X', 'PRESS')248kmi = km.keymap_items.new('object.delete', 'DEL', 'PRESS')249kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)250kmi.properties.name = 'INFO_MT_add'251kmi = km.keymap_items.new('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True)252kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', ctrl=True)253kmi.properties.name = 'VIEW3D_MT_object_apply'254kmi = km.keymap_items.new('wm.call_menu', 'U', 'PRESS')255kmi.properties.name = 'VIEW3D_MT_make_single_user'256kmi = km.keymap_items.new('wm.call_menu', 'L', 'PRESS', ctrl=True)257kmi.properties.name = 'VIEW3D_MT_make_links'258kmi = km.keymap_items.new('object.duplicate_move', 'D', 'PRESS', shift=True)259kmi = km.keymap_items.new('object.duplicate_move_linked', 'D', 'PRESS', alt=True)260kmi = km.keymap_items.new('object.join', 'J', 'PRESS', ctrl=True)261kmi = km.keymap_items.new('object.convert', 'C', 'PRESS', alt=True)262kmi = km.keymap_items.new('object.proxy_make', 'P', 'PRESS', ctrl=True, alt=True)263kmi = km.keymap_items.new('object.make_local', 'L', 'PRESS')264kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'I', 'PRESS')265kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)266kmi = km.keymap_items.new('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)267kmi = km.keymap_items.new('group.create', 'G', 'PRESS', ctrl=True)268kmi = km.keymap_items.new('group.objects_remove', 'G', 'PRESS', ctrl=True, alt=True)269kmi = km.keymap_items.new('group.objects_add_active', 'G', 'PRESS', shift=True, ctrl=True)270kmi = km.keymap_items.new('group.objects_remove_active', 'G', 'PRESS', shift=True, alt=True)271kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', ctrl=True)272kmi.properties.name = 'VIEW3D_MT_object_specials'273kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)274kmi.properties.level = 0275kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)276kmi.properties.level = 1277kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)278kmi.properties.level = 2279kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)280kmi.properties.level = 3281kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)282kmi.properties.level = 4283kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)284kmi.properties.level = 5285kmi = km.keymap_items.new('object.select_all', 'SELECTMOUSE', 'CLICK')286kmi.properties.action = 'DESELECT'287# Map Mesh288km = kc.keymaps.new('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)289kmi = km.keymap_items.new('mesh.loopcut_slide', 'R', 'PRESS', ctrl=True)290kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)291kmi = km.keymap_items.new('mesh.loop_select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)292kmi.properties.extend = True293kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)294kmi = km.keymap_items.new('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)295kmi.properties.extend = True296kmi = km.keymap_items.new('mesh.select_shortest_path', 'SELECTMOUSE', 'PRESS', ctrl=True)297kmi = km.keymap_items.new('mesh.select_all', 'A', 'PRESS')298kmi = km.keymap_items.new('mesh.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)299kmi = km.keymap_items.new('mesh.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)300kmi = km.keymap_items.new('mesh.select_inverse', 'I', 'PRESS', ctrl=True)301kmi = km.keymap_items.new('mesh.select_non_manifold', 'M', 'PRESS', shift=True, ctrl=True, alt=True)302kmi = km.keymap_items.new('mesh.select_linked', 'L', 'PRESS', ctrl=True)303kmi = km.keymap_items.new('mesh.select_linked_pick', 'L', 'PRESS')304kmi = km.keymap_items.new('mesh.select_linked_pick', 'L', 'PRESS', shift=True)305kmi.properties.deselect = True306kmi = km.keymap_items.new('mesh.faces_select_linked_flat', 'F', 'PRESS', shift=True, ctrl=True, alt=True)307kmi.properties.sharpness = 135.0308kmi = km.keymap_items.new('mesh.select_similar', 'G', 'PRESS', shift=True)309kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)310kmi.properties.name = 'VIEW3D_MT_edit_mesh_select_mode'311kmi = km.keymap_items.new('mesh.hide', 'H', 'PRESS')312kmi = km.keymap_items.new('mesh.hide', 'H', 'PRESS', shift=True)313kmi.properties.unselected = True314kmi = km.keymap_items.new('mesh.reveal', 'H', 'PRESS', alt=True)315kmi = km.keymap_items.new('mesh.normals_make_consistent', 'N', 'PRESS', ctrl=True)316kmi = km.keymap_items.new('mesh.normals_make_consistent', 'N', 'PRESS', shift=True, ctrl=True)317kmi.properties.inside = True318kmi = km.keymap_items.new('view3d.edit_mesh_extrude_move_normal', 'E', 'PRESS', ctrl=True)319kmi = km.keymap_items.new('view3d.edit_mesh_extrude_individual_move', 'E', 'PRESS', shift=True)320kmi = km.keymap_items.new('wm.call_menu', 'E', 'PRESS', alt=True)321kmi.properties.name = 'VIEW3D_MT_edit_mesh_extrude'322kmi = km.keymap_items.new('mesh.spin', 'R', 'PRESS', alt=True)323kmi = km.keymap_items.new('mesh.fill', 'F', 'PRESS', alt=True)324kmi = km.keymap_items.new('mesh.beautify_fill', 'F', 'PRESS', shift=True, alt=True)325kmi = km.keymap_items.new('mesh.quads_convert_to_tris', 'T', 'PRESS', ctrl=True)326kmi = km.keymap_items.new('mesh.tris_convert_to_quads', 'J', 'PRESS', alt=True)327kmi = km.keymap_items.new('mesh.edge_flip', 'F', 'PRESS', shift=True, ctrl=True)328kmi = km.keymap_items.new('mesh.rip_move', 'V', 'PRESS')329kmi = km.keymap_items.new('mesh.merge', 'M', 'PRESS', alt=True)330kmi = km.keymap_items.new('transform.shrink_fatten', 'S', 'PRESS', ctrl=True, alt=True)331kmi = km.keymap_items.new('mesh.edge_face_add', 'F', 'PRESS')332kmi = km.keymap_items.new('mesh.duplicate_move', 'D', 'PRESS', shift=True)333kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)334kmi.properties.name = 'INFO_MT_mesh_add'335kmi = km.keymap_items.new('mesh.separate', 'P', 'PRESS')336kmi = km.keymap_items.new('mesh.split', 'Y', 'PRESS')337kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', ctrl=True)338kmi = km.keymap_items.new('mesh.delete', 'X', 'PRESS')339kmi = km.keymap_items.new('mesh.delete', 'DEL', 'PRESS')340kmi = km.keymap_items.new('mesh.knife_cut', 'LEFTMOUSE', 'PRESS', key_modifier='K')341kmi = km.keymap_items.new('mesh.knife_cut', 'LEFTMOUSE', 'PRESS', shift=True, key_modifier='K')342kmi.properties.type = 'MIDPOINTS'343kmi = km.keymap_items.new('object.vertex_parent_set', 'P', 'PRESS', ctrl=True)344kmi = km.keymap_items.new('wm.call_menu', 'W', 'PRESS', ctrl=True)345kmi.properties.name = 'VIEW3D_MT_edit_mesh_specials'346kmi = km.keymap_items.new('wm.call_menu', 'F', 'PRESS', ctrl=True)347kmi.properties.name = 'VIEW3D_MT_edit_mesh_faces'348kmi = km.keymap_items.new('wm.call_menu', 'E', 'PRESS', ctrl=True)349kmi.properties.name = 'VIEW3D_MT_edit_mesh_edges'350kmi = km.keymap_items.new('wm.call_menu', 'V', 'PRESS', ctrl=True)351kmi.properties.name = 'VIEW3D_MT_edit_mesh_vertices'352kmi = km.keymap_items.new('wm.call_menu', 'H', 'PRESS', ctrl=True)353kmi.properties.name = 'VIEW3D_MT_hook'354kmi = km.keymap_items.new('wm.call_menu', 'U', 'PRESS')355kmi.properties.name = 'VIEW3D_MT_uv_map'356kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', ctrl=True)357kmi.properties.name = 'VIEW3D_MT_vertex_group'358kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)359kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'360kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS')361kmi.properties.data_path = 'tool_settings.proportional_edit'362kmi.properties.value_1 = 'DISABLED'363kmi.properties.value_2 = 'ENABLED'364kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'PRESS', alt=True)365kmi.properties.data_path = 'tool_settings.proportional_edit'366kmi.properties.value_1 = 'DISABLED'367kmi.properties.value_2 = 'CONNECTED'368kmi = km.keymap_items.new('mesh.select_all', 'SELECTMOUSE', 'CLICK')369kmi.properties.action = 'DESELECT'...
ProgressionTests.py
Source:ProgressionTests.py
...5from video_store import Asset, VideoStore6from dialogs import UnableToPlayDialog7import stbt8def test_press_the_key():9 stbt.press('KEY_MENU')10def settings_launch():11 menu_launch()12 stbt.press('KEY_CHANNELDOWN')13 stbt.press('KEY_ENTER')14 assert stbt.wait_until(lambda: stbt.match("images/menu/settings_logo.png")), \15 "Settings not launched"16def enter_pin():17 for _ in " " * 4: stbt.press('KEY_0')18 stbt.press('KEY_ENTER')19def test_DVR_after_changing_settings():20 for _ in " " * 3: stbt.press('KEY_EXIT')21 sleep(1)22 count1 = 123 for _ in " " * 10:24 count1 += 125 settings_launch()26 for _ in " " * 3: stbt.press('KEY_DOWN')27 for _ in " " * 2: stbt.press('KEY_ENTER')28 sleep(1)29 for _ in " " * 2: stbt.press('KEY_RIGHT')30 stbt.press('KEY_ENTER')31 sleep(2)32 enter_pin()33 if count1 % 2 == 0:34 stbt.press('KEY_UP')35 stbt.press('KEY_ENTER')36 for _ in " " * 2: stbt.press('KEY_DOWN')37 stbt.press('KEY_ENTER')38 else:39 stbt.press('KEY_UP')40 stbt.press('KEY_DOWN')41 stbt.press('KEY_ENTER')42 stbt.press('KEY_DOWN')43 stbt.press('KEY_ENTER')44 stbt.press('KEY_RIGHT')45 stbt.press('KEY_ENTER')46 sleep(2)47 enter_pin()48 for _ in " " * 2: stbt.press('KEY_RIGHT')49 stbt.press('KEY_DOWN')50 stbt.press('KEY_ENTER')51 stbt.press('KEY_LEFT')52 stbt.press('KEY_ENTER')53 stbt.press('KEY_RIGHT')54 stbt.press('KEY_ENTER')55 stbt.press('KEY_RIGHT')56 stbt.press('KEY_ENTER')57 sleep(2)58 enter_pin()59 stbt.press('KEY_RIGHT')60 stbt.press('KEY_DOWN')61 stbt.press('KEY_ENTER')62 stbt.press('KEY_LEFT')63 stbt.press('KEY_DOWN')64 stbt.press('KEY_ENTER')65 stbt.press('KEY_RIGHT')66 stbt.press('KEY_ENTER')67 mydvr_launch()68 count = 069 while True:70 stbt.press('KEY_ENTER')71 sleep(1)72 if stbt.match('images/cta/watch.png') or stbt.match('images/cta/resume.png'): break73 count += 174 assert count < 16, \75 "Could not find recording to play in DVR page"76 sleep(2)77 stbt.press('KEY_ENTER')78 sleep(3)79 assert stbt.wait_for_motion(timeout_secs=30)80def mydvr_launch():81 for _ in " " * 3: stbt.press('KEY_EXIT')82 sleep(1)83 stbt.press('KEY_MYDVR')84 assert stbt.wait_until(lambda: stbt.match("images/dvr/my_dvr.png")), \85 "MyDVR not launched"86def test_modify_DVR_options_10plus_times():87 counter = 188 for _ in " " * 3: stbt.press('KEY_EXIT')89 sleep(5)90 stbt.press('KEY_RECORD')91 sleep(2)92 for _ in range(10):93 for _ in " " * 2: stbt.press('KEY_EXIT')94 sleep(2)95 stbt.press('KEY_RECORD')96 if not stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_rec.png")) and not stbt.wait_until(97 lambda: stbt.match("images/dvr/edit_ep_deleted.png")):98 for _ in " " * 2: stbt.press('KEY_EXIT')99 sleep(2)100 stbt.press('KEY_RECORD')101 if counter == 1 and stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_deleted.png")):102 stbt.press('KEY_RIGHT')103 stbt.press('KEY_UP')104 for _ in " " * 3: stbt.press('KEY_LEFT')105 stbt.press('KEY_ENTER')106 sleep(2)107 counter += 1108 if counter % 2 == 0:109 stbt.press('KEY_RIGHT')110 assert stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_deleted.png")), \111 "Cannot edit recording setting"112 stbt.press('KEY_UP')113 for _ in " " * 3: stbt.press('KEY_LEFT')114 stbt.press('KEY_ENTER')115 else:116 stbt.press('KEY_RIGHT')117 assert stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_rec.png")), \118 "Cannot edit recording setting"119 stbt.press('KEY_UP')120 for _ in " " * 3: stbt.press('KEY_LEFT')121 stbt.press('KEY_ENTER')122def test_modify_DVR_from_miniG_50plus_times():123 counter = 1124 for _ in " " * 3: stbt.press('KEY_EXIT')125 sleep(5)126 stbt.press('KEY_RECORD')127 sleep(2)128 for _ in range(50):129 for _ in " " * 2: stbt.press('KEY_EXIT')130 sleep(3)131 for _ in " " * 2: stbt.press('KEY_ENTER')132 sleep(1)133 stbt.press('KEY_RECORD')134 if not stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_rec.png")) and not stbt.wait_until(135 lambda: stbt.match("images/dvr/edit_ep_deleted.png")):136 stbt.press('KEY_RECORD')137 if counter == 1 and stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_deleted.png")):138 stbt.press('KEY_RIGHT')139 stbt.press('KEY_UP')140 for _ in " " * 3: stbt.press('KEY_LEFT')141 stbt.press('KEY_ENTER')142 sleep(2)143 counter += 1144 if counter % 2 == 0:145 stbt.press('KEY_RIGHT')146 assert stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_deleted.png")), \147 "Cannot edit recording setting"148 stbt.press('KEY_UP')149 for _ in " " * 3: stbt.press('KEY_LEFT')150 stbt.press('KEY_ENTER')151 else:152 stbt.press('KEY_RIGHT')153 assert stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_rec.png")), \154 "Cannot edit recording setting"155 stbt.press('KEY_UP')156 for _ in " " * 3: stbt.press('KEY_LEFT')157 stbt.press('KEY_ENTER')158def test_tuning_channels_5_times():159 for _ in " " * 3: stbt.press('KEY_EXIT')160 if not stbt.wait_until(lambda: stbt.match("images/env/do_you_want_to_upgrade.png")) and not stbt.wait_until(161 lambda: stbt.match("images/env/channel_unavailable.png")) and not stbt.wait_until(162 lambda: stbt.match("images/env/title_blocked.png")):163 assert stbt.wait_until(lambda: stbt.wait_for_motion()), \164 "Live TV not reached at test start"165 channels = [25, 31, 27, 29, 30]166 t = 0167 for ch in channels:168 t += 1169 for x in list(str(ch)):170 stbt.press("KEY_" + x)171 sleep(0.6)172 sleep(4)173 if stbt.match('images/dvr/continue_to_miniguide.png') and t == 1:174 for _ in " " * 2: stbt.press('KEY_RIGHT')175 for _ in " " * 2: stbt.press('KEY_ENTER')176 stbt.press('KEY_RIGHT')177 stbt.press('KEY_ENTER')178 print (t)179 sleep(20)180 if not stbt.wait_until(lambda: stbt.match("images/env/do_you_want_to_upgrade.png")) and not stbt.wait_until(181 lambda: stbt.match("images/env/channel_unavailable.png")) and not stbt.wait_until(182 lambda: stbt.match("images/env/title_blocked.png")):183 assert stbt.wait_until(lambda: stbt.wait_for_motion()), \184 "New channel " + str(ch) + " not reached on channel change number " + t185def test_tuning_channels_20plus_times():186 for _ in " " * 3: stbt.press('KEY_EXIT')187 if not stbt.wait_until(lambda: stbt.match("images/env/do_you_want_to_upgrade.png")) and not stbt.wait_until(188 lambda: stbt.match("images/env/channel_unavailable.png")):189 assert stbt.wait_until(lambda: stbt.wait_for_motion()), \190 "Live TV not reached at test start"191 channels = [21, 24, 27, 29]192 t = 0193 for _ in range(5):194 for ch in channels:195 t += 1196 for x in list(str(ch)):197 stbt.press("KEY_" + x)198 sleep(0.6)199 sleep(4)200 if stbt.match('images/dvr/continue_to_miniguide.png') and t == 1:201 for _ in " " * 2: stbt.press('KEY_RIGHT')202 for _ in " " * 2: stbt.press('KEY_ENTER')203 stbt.press('KEY_RIGHT')204 stbt.press('KEY_ENTER')205 print (t)206 if not stbt.wait_until(lambda: stbt.match("images/env/do_you_want_to_upgrade.png")) and not stbt.wait_until(207 lambda: stbt.match("images/env/channel_unavailable.png")):208 assert stbt.wait_until(lambda: stbt.wait_for_motion()), \209 "New channel " + str(ch) + " not reached on channel change number " + t210def test_play_VOD_50plus_times():211 for _ in " " * 3: stbt.press('KEY_EXIT')212 VideoStore.open()213 # Find an asset that hasn't been rented yet.214 for _ in range(20): # Try 20 assets215 # Wait for asset title to stabilise -- it loads slightly after the216 # Video Store logo appears.217 title = wait_until(lambda: VideoStore().selection, stable_secs=1)218 print "Checking asset to see if we can rent it: %s" % title219 stbt.press("KEY_ENTER")220 asset = wait_until(Asset, timeout_secs=20)221 if asset.rentable:222 print "Asset is rentable; trying to rent it"223 asset.rent()224 try:225 stbt.wait_for_motion(timeout_secs=30,226 mask="images/vod/mask-out-playbar.png")227 print "Successfully rented: %s" % title228 break229 except stbt.MotionTimeout:230 if UnableToPlayDialog():231 UnableToPlayDialog().dismiss()232 else:233 assert False, "Didn't detect video playback *nor* " \234 "the 'Unable to Play' dialog."235 stbt.press("KEY_LAST")236 assert wait_until(VideoStore), \237 "Didn't detect VideoStore main carousel after pressing back"238 stbt.press("KEY_RIGHT")239 assert wait_until(240 # pylint:disable=cell-var-from-loop241 lambda: VideoStore().selection != title), \242 "Carousel selection didn't change after pressing right"243 else:244 assert False, "Didn't find rentable playable asset after 20 attempts"245 for _ in range(50):246 stbt.press('KEY_EXIT')247 MyLibrary.open().navigate_to("Expiring Soon", title)248 # MyLibrary.open().navigate_to("Expiring Soon")249 stbt.press('KEY_ENTER')250 assert wait_until(lambda: Asset().title == title)251 assert Asset().selected_button.text == "RESTART"252 stbt.press('KEY_ENTER')253 assert stbt.wait_for_motion(timeout_sec=20)254def test_DVR_playback_10plus_times_yes_TTS():255 # Turn on TTS256 for _ in " " * 3: stbt.press('KEY_EXIT')257 GNarration_setting("On")258 for _ in range(10):259 count = 0260 for _ in " " * 3: stbt.press('KEY_EXIT')261 sleep(2)262 if stbt.match('images/env/exit_overlay.png'):263 stbt.press('KEY_ENTER')264 sleep(2)265 sleep(3)266 stbt.press('KEY_MYDVR')267 sleep(3)268 if stbt.match('images/dvr/cancel_a_recording.png'):269 for _ in " " * 2: stbt.press('KEY_RIGHT')270 for _ in " " * 2: stbt.press('KEY_ENTER')271 stbt.press('KEY_RIGHT')272 stbt.press('KEY_ENTER')273 assert stbt.wait_until(lambda: stbt.match("images/dvr/my_dvr.png")), \274 "MyDVR not launched"275 while True:276 stbt.press('KEY_ENTER')277 sleep(1)278 if stbt.match('images/cta/watch.png') or stbt.match('images/cta/resume.png'): break279 count += 1280 assert count < 16, \281 "Could not find recording to play in DVR page"282 sleep(2)283 stbt.press('KEY_ENTER')284 sleep(3)285 assert stbt.wait_for_motion(timeout_secs=20)286def test_DVR_playback_50plus_times_no_TTS():287 # Turn off TTS288 for _ in " " * 3: stbt.press('KEY_EXIT')289 count = 0290 # GNarration_setting("Off")291 for _ in range(51):292 count = 0293 for _ in " " * 3: stbt.press('KEY_EXIT')294 sleep(3)295 stbt.press('KEY_MYDVR')296 sleep(3)297 if stbt.match('images/dvr/cancel_a_recording.png'):298 for _ in " " * 2: stbt.press('KEY_RIGHT')299 for _ in " " * 2: stbt.press('KEY_ENTER')300 stbt.press('KEY_RIGHT')301 stbt.press('KEY_ENTER')302 assert stbt.wait_until(lambda: stbt.match("images/dvr/my_dvr.png")), \303 "MyDVR not launched"304 while True:305 stbt.press('KEY_ENTER')306 sleep(1)307 if stbt.match('images/cta/watch.png') or stbt.match('images/cta/resume.png'): break308 count += 1309 assert count < 20, \310 "Could not find recording to play in DVR page"311 sleep(2)312 stbt.press('KEY_ENTER')313 sleep(3)314 assert stbt.wait_for_motion(timeout_secs=20)315def guide_launch():316 stbt.press('KEY_GUIDE')317 assert stbt.wait_until(lambda: stbt.match("images/guide/guide_options.png")), \318 "Guide not launched"319def menu_launch():320 for _ in " " * 2: stbt.press('KEY_EXIT')321 stbt.press('KEY_MENU')322 assert stbt.wait_until(lambda: stbt.match("images/menu/menu_logo.png")), \323 "Menu not launched"324def test_random_presses_multiple_session():325 for _ in " " * 3: stbt.press('KEY_EXIT')326 for _ in " " * 10:327 guide_launch()328 for _ in " " * 3: stbt.press('KEY_DOWN')329 for _ in " " * 3: stbt.press('KEY_RIGHT')330 for _ in " " * 3: stbt.press('KEY_LEFT')331 menu_launch()332 stbt.press('KEY_UP')333 stbt.press('KEY_ENTER')334 sleep(1)335 stbt.press('KEY_INFO')336 sleep(2)337 stbt.press('KEY_LAST')338 for _ in " " * 2: stbt.press('KEY_OPTIONS')339 sleep(1)340 for _ in " " * 3: stbt.press('KEY_EXIT')341 count = 0342 while True:343 if not stbt.wait_until(lambda: stbt.wait_for_motion(timeout_secs=10)):344 stbt.press('KEY_CHANNELUP')345 else:346 break347 count += 1348 assert count < 4, \349 "No motion found on Live after 4 channel changes"350 menu_launch()351 for _ in " " * 5: stbt.press('KEY_UP')352 for _ in " " * 2: stbt.press('KEY_DOWN')353 stbt.press('KEY_ENTER')354 for _ in " " * 5: stbt.press('KEY_DOWN')355 for _ in " " * 5: stbt.press('KEY_UP')356 stbt.press('KEY_LEFT')357 stbt.press('KEY_RIGHT')358 stbt.press('KEY_LEFT')359 stbt.press('KEY_RIGHT')360 stbt.press('KEY_LEFT')361 stbt.press('KEY_RIGHT')362 stbt.press('KEY_ENTER')363 for _ in " " * 3: stbt.press('KEY_EXIT')364 assert stbt.wait_for_motion(timeout_secs=20)365def test_20_trickplay_buttons_on_TSB():366 for _ in " " * 3: stbt.press('KEY_EXIT')367 if stbt.wait_until(lambda: stbt.match("images/dvr/pause.png")):368 stbt.press('KEY_PLAYPAUSE')369 count = 0370 while True:371 if not stbt.wait_until(lambda: stbt.wait_for_motion(timeout_secs=10)):372 stbt.press('KEY_CHANNELUP')373 else:374 break375 count += 1376 assert count < 4, \377 "No motion found on Live after 4 channel changes"378 sleep(2)379 stbt.press('KEY_PLAYPAUSE')380 assert stbt.wait_until(lambda: stbt.match("images/dvr/pause.png")), \381 "Unable to pause Live"382 sleep(50)383 for _ in range(5):384 stbt.press('KEY_PLAYPAUSE')385 assert stbt.wait_until(lambda: stbt.match("images/dvr/play.png")), \386 "Unable to play Live after pause"387 stbt.press('KEY_LEFT')388 assert stbt.wait_until(lambda: stbt.match("images/dvr/rewind.png")), \389 "Unable to rewind Live"390 for _ in " " * 2: stbt.press('KEY_RIGHT')391 assert stbt.wait_until(lambda: stbt.match("images/dvr/fastforward.png")), \392 "Unable to fastforward Live"393 stbt.press('KEY_PLAYPAUSE')394 assert stbt.wait_until(lambda: stbt.match("images/dvr/play.png")), \395 "Unable to play Live"396 stbt.press('KEY_PLAYPAUSE')397 assert stbt.wait_until(lambda: stbt.match("images/dvr/pause.png")), \398 "Unable to pause Live"399def test_20_trickplay_buttons_on_TSB_iguide():400 if stbt.wait_until(lambda: stbt.match("images/dvr/i_pause.png")):401 stbt.press('KEY_PLAY')402 count = 0403 while True:404 if not stbt.wait_until(lambda: stbt.wait_for_motion(timeout_secs=10)):405 stbt.press('KEY_CHANNELUP')406 else:407 break408 count += 1409 assert count < 4, \410 "No motion found on Live after 4 channel changes"411 sleep(2)412 stbt.press('KEY_PAUSE')413 assert stbt.wait_until(lambda: stbt.match("images/dvr/i_pause.png")), \414 "Unable to pause Live"415 sleep(80)416 for _ in range(10):417 stbt.press('KEY_PLAY')418 assert stbt.wait_until(lambda: stbt.match("images/dvr/i_play.png")), \419 "Unable to play Live after pause"420 stbt.press('KEY_REWIND')421 assert stbt.wait_until(lambda: stbt.match("images/dvr/i_rewind.png")), \422 "Unable to rewind Live"423 for _ in " " * 2: stbt.press('KEY_FASTFORWARD')424 assert stbt.wait_until(lambda: stbt.match("images/dvr/i_fastforward.png")), \425 "Unable to fastforward Live"426 stbt.press('KEY_PLAY')427 assert stbt.wait_until(lambda: stbt.match("images/dvr/i_play.png")), \428 "Unable to play Live"429 stbt.press('KEY_PAUSE')430 assert stbt.wait_until(lambda: stbt.match("images/dvr/i_pause.png")), \...
google_doc.py
Source:google_doc.py
...63 'open discussion thread': Key('cmd+alt+shift+a'),64 'enter current comment': Key('ctrl+enter'),65 'insert footnote': Key('cmd+alt+f'),66 'move to current footnote': lambda m: (67 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),68 press('e'), press('f'),69 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),70 ),71 'move to next footnote': lambda m: (72 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),73 press('n'), press('f'),74 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),75 ),76 'move to previous footnote': lambda m: (77 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),78 press('p'), press('f'),79 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),80 ),81 'context menu': Key('cmd+shift+\\'),82 'file menu': Key('ctrl+alt+f'),83 'edit menu': Key('ctrl+alt+e'),84 'view menu': Key('ctrl+alt+v'),85 'insert menu': Key('ctrl+alt+i'),86 'format menu': Key('ctrl+alt+o'),87 'tools menu': Key('ctrl+alt+t'),88 'table menu': Key('ctrl+alt+b'),89 'help menu': Key('ctrl+alt+h'),90 'accessibility menu': Key('ctrl+alt+a'),91 'input tools menu': Key('cmd+alt+shift+k'),92 'toggle input controls': Key('cmd+shift+k'),93 'select all': Key('cmd+a'),94 'extend selection one character left': Key('shift+left'),95 'extend selection one character right': Key('shift+right'),96 'extend selection one line up': Key('shift+up'),97 'extend selection one line down': Key('shift+down'),98 'extend selection to the beginning of the line': Key('shift+home'),99 'extend selection one paragraph up': Key('alt+shift+up'),100 'extend selection one paragraph down': Key('alt+shift+down'),101 'extend selection to the end of the line': Key('shift+end'),102 'extend selection to the beginning of the document': Key('cmd+shift+up'),103 'extend selection to the end of the document': Key('cmd+shift+down'),104 'select current list item': lambda m: (105 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),106 press('e'), press('i'),107 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),108 ),109 'select all list items at current level': lambda m: (110 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),111 press('e'), press('o'),112 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),113 ),114 'enable screen reader supportlearn more about using google docs with a screen reader': Key('alt+cmd+z'),115 'speak selection': Key('ctrl+cmd+x'),116 'speak from cursor location': Key('ctrl+cmd+r'),117 'announce cursor location': lambda m: (118 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),119 press('a'), press('l'),120 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),121 ),122 'announce formatting at cursor location': lambda m: (123 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),124 press('a'), press('f'),125 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),126 ),127 'speak the table column and row header': lambda m: (128 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),129 press('t'), press('h'),130 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),131 ),132 'speak the table cell location': lambda m: (133 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),134 press('t'), press('n'),135 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),136 ),137 'speak the table row header': lambda m: (138 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),139 press('t'), press('r'),140 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),141 ),142 'speak the table column header': lambda m: (143 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),144 press('t'), press('c'),145 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),146 ),147 'move to next heading': lambda m: (148 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),149 press('n'), press('h'),150 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),151 ),152 'move to previous heading': lambda m: (153 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),154 press('p'), press('h'),155 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),156 ),157 'move to next heading 1': lambda m: (158 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),159 press('n'), press('1'),160 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),161 ),162 'move to next heading 2': lambda m: (163 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),164 press('n'), press('2'),165 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),166 ),167 'move to next heading 3': lambda m: (168 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),169 press('n'), press('3'),170 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),171 ),172 'move to next heading 4': lambda m: (173 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),174 press('n'), press('4'),175 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),176 ),177 'move to next heading 5': lambda m: (178 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),179 press('n'), press('5'),180 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),181 ),182 'move to next heading 6': lambda m: (183 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),184 press('n'), press('6'),185 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),186 ),187 'move to previous heading 1': lambda m: (188 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),189 press('p'), press('1'),190 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),191 ),192 'move to previous heading 2': lambda m: (193 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),194 press('p'), press('2'),195 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),196 ),197 'move to previous heading 3': lambda m: (198 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),199 press('p'), press('3'),200 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),201 ),202 'move to previous heading 4': lambda m: (203 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),204 press('p'), press('4'),205 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),206 ),207 'move to previous heading 5': lambda m: (208 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),209 press('p'), press('5'),210 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),211 ),212 'move to previous heading 6': lambda m: (213 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),214 press('p'), press('6'),215 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),216 ),217 'move to next media': lambda m: (218 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),219 press('n'), press('g'),220 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),221 ),222 'move to previous media': lambda m: (223 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),224 press('p'), press('g'),225 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),226 ),227 'move to next list': lambda m: (228 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),229 press('n'), press('o'),230 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),231 ),232 'move to previous list': lambda m: (233 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),234 press('p'), press('o'),235 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),236 ),237 'move to next item in the current list': lambda m: (238 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),239 press('n'), press('i'),240 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),241 ),242 'move to previous item in the current list': lambda m: (243 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),244 press('p'), press('i'),245 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),246 ),247 'move to next link': lambda m: (248 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),249 press('n'), press('l'),250 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),251 ),252 'move to previous link': lambda m: (253 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),254 press('p'), press('l'),255 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),256 ),257 'move to next bookmark': lambda m: (258 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),259 press('n'), press('b'),260 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),261 ),262 'move to previous bookmark': lambda m: (263 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),264 press('p'), press('b'),265 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),266 ),267 'move to next formatting change': lambda m: (268 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),269 press('n'), press('w'),270 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),271 ),272 'move to previous formatting change': lambda m: (273 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),274 press('p'), press('w'),275 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),276 ),277 'move to the next edit': lambda m: (278 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),279 press('n'), press('r'),280 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),281 ),282 'move to the previous edit': lambda m: (283 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),284 press('p'), press('r'),285 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),286 ),287 'move to the start of the table': lambda m: (288 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),289 press('t'), press('s'),290 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),291 ),292 'move to the end of the table': lambda m: (293 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),294 press('t'), press('d'),295 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),296 ),297 'move to the start of the table column': lambda m: (298 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),299 press('t'), press('i'),300 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),301 ),302 'move to the end of the table column': lambda m: (303 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),304 press('t'), press('k'),305 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),306 ),307 'move to the next table column': lambda m: (308 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),309 press('t'), press('b'),310 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),311 ),312 'move to the previous table column': lambda m: (313 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),314 press('t'), press('v'),315 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),316 ),317 'move to the start of the table row': lambda m: (318 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),319 press('t'), press('j'),320 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),321 ),322 'move to the end of the table row': lambda m: (323 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),324 press('t'), press('l'),325 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),326 ),327 'move to the next table row': lambda m: (328 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),329 press('t'), press('m'),330 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),331 ),332 'move to the previous table row': lambda m: (333 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),334 press('t'), press('g'),335 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),336 ),337 'exit table': lambda m: (338 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),339 press('t'), press('e'),340 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),341 ),342 'move to the next table': lambda m: (343 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),344 press('n'), press('t'),345 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),346 ),347 'move to the previous table': lambda m: (348 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, down=True),349 press('p'), press('t'),350 ctrl.key_press('shift', ctrl=True, cmd=True, shift=True, up=True),351 ),352 'open revision history': Key('cmd+alt+shift+h'),353 'open explore tool': Key('cmd+alt+shift+i'),354 'open dictionary': Key('cmd+shift+y'),355 'word count': Key('cmd+shift+c'),356 'start voice typing': Key('cmd+shift+s'),357 'page up': Key('pageup'),358 'page down': Key('pagedown'),359 'move to next misspelling': Key('cmd+\''),360 'move to previous misspelling': Key('cmd+;'),361 'insert or move to header': lambda m: (362 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),363 press('o'), press('h'),364 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),365 ),366 'insert or move to footer': lambda m: (367 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),368 press('o'), press('f'),369 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),370 ),371 'move focus to popup': lambda m: (372 ctrl.key_press('cmd', ctrl=True, cmd=True, down=True),373 press('e'), press('p'),374 ctrl.key_press('cmd', ctrl=True, cmd=True, up=True),375 ),376 'move focus out of document text': Key('cmd+alt+shift+m'),377 'return focus to document text': Key('esc'),378 'focus containing webpage': Key('ctrl+shift+esc'),...
ncurses.py
Source:ncurses.py
1#!/usr/bin/env python2#3# $Id: ncurses.py 36559 2004-07-18 05:56:09Z tim_one $4#5# (n)curses exerciser in Python, an interactive test for the curses6# module. Currently, only the panel demos are ported.7import curses8from curses import panel9def wGetchar(win = None):10 if win == None: win = stdscr11 return win.getch()12def Getchar():13 wGetchar()14#15# Panels tester16#17def wait_a_while():18 if nap_msec == 1:19 Getchar()20 else:21 curses.napms(nap_msec)22def saywhat(text):23 stdscr.move(curses.LINES - 1, 0)24 stdscr.clrtoeol()25 stdscr.addstr(text)26def mkpanel(color, rows, cols, tly, tlx):27 win = curses.newwin(rows, cols, tly, tlx)28 pan = panel.new_panel(win)29 if curses.has_colors():30 if color == curses.COLOR_BLUE:31 fg = curses.COLOR_WHITE32 else:33 fg = curses.COLOR_BLACK34 bg = color35 curses.init_pair(color, fg, bg)36 win.bkgdset(ord(' '), curses.color_pair(color))37 else:38 win.bkgdset(ord(' '), curses.A_BOLD)39 return pan40def pflush():41 panel.update_panels()42 curses.doupdate()43def fill_panel(pan):44 win = pan.window()45 num = pan.userptr()[1]46 win.move(1, 1)47 win.addstr("-pan%c-" % num)48 win.clrtoeol()49 win.box()50 maxy, maxx = win.getmaxyx()51 for y in range(2, maxy - 1):52 for x in range(1, maxx - 1):53 win.move(y, x)54 win.addch(num)55def demo_panels(win):56 global stdscr, nap_msec, mod57 stdscr = win58 nap_msec = 159 mod = ["test", "TEST", "(**)", "*()*", "<-->", "LAST"]60 stdscr.refresh()61 for y in range(0, curses.LINES - 1):62 for x in range(0, curses.COLS):63 stdscr.addstr("%d" % ((y + x) % 10))64 for y in range(0, 1):65 p1 = mkpanel(curses.COLOR_RED,66 curses.LINES / 2 - 2,67 curses.COLS / 8 + 1,68 0,69 0)70 p1.set_userptr("p1")71 p2 = mkpanel(curses.COLOR_GREEN,72 curses.LINES / 2 + 1,73 curses.COLS / 7,74 curses.LINES / 4,75 curses.COLS / 10)76 p2.set_userptr("p2")77 p3 = mkpanel(curses.COLOR_YELLOW,78 curses.LINES / 4,79 curses.COLS / 10,80 curses.LINES / 2,81 curses.COLS / 9)82 p3.set_userptr("p3")83 p4 = mkpanel(curses.COLOR_BLUE,84 curses.LINES / 2 - 2,85 curses.COLS / 8,86 curses.LINES / 2 - 2,87 curses.COLS / 3)88 p4.set_userptr("p4")89 p5 = mkpanel(curses.COLOR_MAGENTA,90 curses.LINES / 2 - 2,91 curses.COLS / 8,92 curses.LINES / 2,93 curses.COLS / 2 - 2)94 p5.set_userptr("p5")95 fill_panel(p1)96 fill_panel(p2)97 fill_panel(p3)98 fill_panel(p4)99 fill_panel(p5)100 p4.hide()101 p5.hide()102 pflush()103 saywhat("press any key to continue")104 wait_a_while()105 saywhat("h3 s1 s2 s4 s5;press any key to continue")106 p1.move(0, 0)107 p3.hide()108 p1.show()109 p2.show()110 p4.show()111 p5.show()112 pflush()113 wait_a_while()114 saywhat("s1; press any key to continue")115 p1.show()116 pflush()117 wait_a_while()118 saywhat("s2; press any key to continue")119 p2.show()120 pflush()121 wait_a_while()122 saywhat("m2; press any key to continue")123 p2.move(curses.LINES / 3 + 1, curses.COLS / 8)124 pflush()125 wait_a_while()126 saywhat("s3; press any key to continue")127 p3.show()128 pflush()129 wait_a_while()130 saywhat("m3; press any key to continue")131 p3.move(curses.LINES / 4 + 1, curses.COLS / 15)132 pflush()133 wait_a_while()134 saywhat("b3; press any key to continue")135 p3.bottom()136 pflush()137 wait_a_while()138 saywhat("s4; press any key to continue")139 p4.show()140 pflush()141 wait_a_while()142 saywhat("s5; press any key to continue")143 p5.show()144 pflush()145 wait_a_while()146 saywhat("t3; press any key to continue")147 p3.top()148 pflush()149 wait_a_while()150 saywhat("t1; press any key to continue")151 p1.show()152 pflush()153 wait_a_while()154 saywhat("t2; press any key to continue")155 p2.show()156 pflush()157 wait_a_while()158 saywhat("t3; press any key to continue")159 p3.show()160 pflush()161 wait_a_while()162 saywhat("t4; press any key to continue")163 p4.show()164 pflush()165 wait_a_while()166 for itmp in range(0, 6):167 w4 = p4.window()168 w5 = p5.window()169 saywhat("m4; press any key to continue")170 w4.move(curses.LINES / 8, 1)171 w4.addstr(mod[itmp])172 p4.move(curses.LINES / 6, itmp * curses.COLS / 8)173 w5.move(curses.LINES / 6, 1)174 w5.addstr(mod[itmp])175 pflush()176 wait_a_while()177 saywhat("m5; press any key to continue")178 w4.move(curses.LINES / 6, 1)179 w4.addstr(mod[itmp])180 p5.move(curses.LINES / 3 - 1, itmp * 10 + 6)181 w5.move(curses.LINES / 8, 1)182 w5.addstr(mod[itmp])183 pflush()184 wait_a_while()185 saywhat("m4; press any key to continue")186 p4.move(curses.LINES / 6, (itmp + 1) * curses.COLS / 8)187 pflush()188 wait_a_while()189 saywhat("t5; press any key to continue")190 p5.top()191 pflush()192 wait_a_while()193 saywhat("t2; press any key to continue")194 p2.top()195 pflush()196 wait_a_while()197 saywhat("t1; press any key to continue")198 p1.top()199 pflush()200 wait_a_while()201 saywhat("d2; press any key to continue")202 del p2203 pflush()204 wait_a_while()205 saywhat("h3; press any key to continue")206 p3.hide()207 pflush()208 wait_a_while()209 saywhat("d1; press any key to continue")210 del p1211 pflush()212 wait_a_while()213 saywhat("d4; press any key to continue")214 del p4215 pflush()216 wait_a_while()217 saywhat("d5; press any key to continue")218 del p5219 pflush()220 wait_a_while()221 if nap_msec == 1:222 break223 nap_msec = 100224#225# one fine day there'll be the menu at this place226#...
example_test.py
Source:example_test.py
...10import subprocess11import getpass12import shutil13def test_press_check():14 stbt.press('KEY_MENU')15def test_DVR_on_reboot():16 count = 017 while True:18 if stbt.is_screen_black(): break19 count += 120 sleep(3)21 assert count < 10, \22 "STB did not reboot within 30 seconds with osdiag RebootNow" 23 count = 024 while True:25 stbt.press('KEY_POWER')26 sleep(5)27 if stbt.match('images/menu/stick_around.png') or stbt.match('images/menu/reboot_logo.png'): break28 sleep(5)29 count += 130 assert count < 18, \31 "Stick Around screen is not shown after reboot within 3 minutes"32 stbt.wait_for_motion(timeout_secs=300)33 stbt.press('KEY_RECORD')34 assert stbt.wait_until(lambda: stbt.match("images/dvr/edit_ep_rec.png") or stbt.match("images/dvr/ch_bar_rec.png")), \35 "RECORD press on live TV did not set recording, or prompt for edit recording"36 mydvr_launch()37 count = 038 while True:39 stbt.press('KEY_ENTER')40 if stbt.match('images/cta/watch.png'): break41 count += 142 assert count < 16, \43 "Could not find recording to play in DVR page"44 stbt.press('KEY_ENTER')45 assert stbt.wait_for_motion(timeout_secs=20)46 47def guide_launch():48 stbt.press('KEY_GUIDE')49 assert stbt.wait_until(lambda: stbt.match("images/guide/guide_options.png")), \50 "Guide not launched"51 52def miniguide_launch():53 stbt.press('KEY_EXIT')54 stbt.press('KEY_ENTER')55 time.sleep(1.2)56 stbt.press('KEY_ENTER')57 assert stbt.wait_until(lambda: stbt.match("images/miniguide/miniguide.png")), \58 "Miniguide not launched"59 60def test_mydvr_launch():61 f = open("testFile.txt","w+")62 stbt.press('KEY_EXIT')63 f.write("Step 1: press exit: Passed\n")64 stbt.press('KEY_MYDVR')65 f.write("Step 2: press MyDVR: Passed\n")66 f.close()67 assert stbt.wait_until(lambda: stbt.match("images/dvr/my_dvr.png")), \68 "MyDVR not launched"69def test_VOD_ME_6119_tv_shows_launch():70 init()71 tv_shows_launch()72 73def test_VOD_ME_6120_check_tv_shows_filter():74 tv_shows_launch()75 assert stbt.wait_until(lambda: stbt.match("images/vod/included_with.png")), \76 "Included With filter not found in TV Shows"77 78def test_VOD_ME_4434_check_VODpage_not_in_Recently_Watched():79 tv_shows_launch()80 time.sleep(65)81 stbt.press('KEY_EXIT')82 my_library_launch()83 while True:84 stbt.press('KEY_DOWN')85 if stbt.wait_for_match('images/lane/recently_watched.png'): break 86 stbt.press('KEY_ENTER')87 88def my_library_launch():89 menu_launch()90 stbt.press('KEY_CHANNELUP')91 for _ in " "*2: stbt.press('KEY_DOWN')92 stbt.press('KEY_ENTER')93 assert stbt.wait_until(lambda: stbt.match("images/vod/my_library_header.png")), \94 "My Library not launched"95 96def tv_shows_launch():97 menu_launch()98 stbt.press('KEY_CHANNELUP')99 for _ in " "*3: stbt.press('KEY_DOWN')100 stbt.press('KEY_ENTER')101 assert stbt.wait_until(lambda: stbt.match("images/vod/tv_shows_logo.png")), \102 "TV Shows not launched"103 104def movies_launch():105 menu_launch()106 stbt.press('KEY_CHANNELUP')107 for _ in " "*4: stbt.press('KEY_DOWN')108 stbt.press('KEY_ENTER')109 assert stbt.wait_until(lambda: stbt.match("images/vod/movies_logo.png")), \110 "Movies not launched"111 112def video_store_launch():113 menu_launch()114 stbt.press('KEY_CHANNELUP')115 for _ in " "*5: stbt.press('KEY_DOWN')116 stbt.press('KEY_ENTER')117 assert stbt.wait_until(lambda: stbt.match("images/vod/video_store_logo.png")), \118 "Video Store not launched"119 120def settings_launch():121 menu_launch()122 stbt.press('KEY_CHANNELDOWN')123 stbt.press('KEY_ENTER')124 assert stbt.wait_until(lambda: stbt.match("images/menu/settings_logo.png")), \125 "Settings not launched"126 127def search_launch():128 menu_launch()129 stbt.press('KEY_CHANNELUP')130 stbt.press('KEY_ENTER')131 assert stbt.wait_until(lambda: stbt.match("images/menu/search_logo.png")), \132 "Search not launched"133def menu_launch():134 for _ in " "*2: stbt.press('KEY_EXIT')135 stbt.press('KEY_MENU')136 assert stbt.wait_until(lambda: stbt.match("images/menu/menu_logo.png")), \137 "Menu not launched"138 139def guide_launch():140 for _ in " "*2: stbt.press('KEY_EXIT')141 stbt.press('KEY_GUIDE')142 assert stbt.wait_until(lambda: stbt.match("images/guide/guide_options.png")), \143 "Guide not launched"144 145def test_launch_methods():146 init()147 menu_launch()148 guide_launch()149 miniguide_launch()150 my_library_launch()151 tv_shows_launch()152 movies_launch()153 video_store_launch()154 settings_launch()155 156def init():157 if stbt.match('images/env/user_settings.png'):158 for _ in " "*2: stbt.press('KEY_POWER')159 else:160 stbt.press('KEY_EXIT')161 stbt.press('KEY_EXIT')162 guide_launch()163 stbt.press('KEY_EXIT')164def test_read_menu():165 stbt.press('KEY_CLOSE')166 sleep(1)167 stbt.press('KEY_MENU')168 sleep(1)169 print stbt.ocr()170def test_that_live_tv_is_playing():171 stbt.press('KEY_CLOSE') # Close any open menus172 assert stbt.wait_for_motion()173 174def test_that_stb_tester_logo_is_shown():175 stbt.press('KEY_CHANNELUP')...
en.js
Source:en.js
1/*2Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.3For licensing, see LICENSE.html or http://ckeditor.com/license4*/5CKEDITOR.plugins.setLang( 'a11yhelp', 'en',6{7 accessibilityHelp :8 {9 title : 'Accessibility Instructions',10 contents : 'Help Contents. To close this dialog press ESC.',11 legend :12 [13 {14 name : 'General',15 items :16 [17 {18 name : 'Editor Toolbar',19 legend:20 'Press ${toolbarFocus} to navigate to the toolbar. ' +21 'Move to next toolbar button with TAB or RIGHT ARROW. ' +22 'Move to previous button with SHIFT+TAB or LEFT ARROW. ' +23 'Press SPACE or ENTER to activate the toolbar button.'24 },25 {26 name : 'Editor Dialog',27 legend :28 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. ' +29 'For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. ' +30 'Then move to next tab with TAB OR RIGTH ARROW. ' +31 'Move to previous tab with SHIFT + TAB or LEFT ARROW. ' +32 'Press SPACE or ENTER to select the tab page.'33 },34 {35 name : 'Editor Context Menu',36 legend :37 'Press ${contextMenu} or APPLICATION KEY to open context-menu. ' +38 'Then move to next menu option with TAB or DOWN ARROW. ' +39 'Move to previous option with SHIFT+TAB or UP ARROW. ' +40 'Press SPACE or ENTER to select the menu option. ' +41 'Open sub-menu of current option wtih SPACE or ENTER or RIGHT ARROW. ' +42 'Go back to parent menu item with ESC or LEFT ARROW. ' +43 'Close context menu with ESC.'44 },45 {46 name : 'Editor List Box',47 legend :48 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. ' +49 'Move to previous list item with SHIFT + TAB or UP ARROW. ' +50 'Press SPACE or ENTER to select the list option. ' +51 'Press ESC to close the list-box.'52 },53 {54 name : 'Editor Element Path Bar',55 legend :56 'Press ${elementsPathFocus} to navigate to the elements path bar. ' +57 'Move to next element button with TAB or RIGHT ARROW. ' +58 'Move to previous button with SHIFT+TAB or LEFT ARROW. ' +59 'Press SPACE or ENTER to select the element in editor.'60 }61 ]62 },63 {64 name : 'Commands',65 items :66 [67 {68 name : ' Undo command',69 legend : 'Press ${undo}'70 },71 {72 name : ' Redo command',73 legend : 'Press ${redo}'74 },75 {76 name : ' Bold command',77 legend : 'Press ${bold}'78 },79 {80 name : ' Italic command',81 legend : 'Press ${italic}'82 },83 {84 name : ' Underline command',85 legend : 'Press ${underline}'86 },87 {88 name : ' Link command',89 legend : 'Press ${link}'90 },91 {92 name : ' Toolbar Collapse command',93 legend : 'Press ${toolbarCollapse}'94 },95 {96 name : ' Accessibility Help',97 legend : 'Press ${a11yHelp}'98 }99 ]100 }101 ]102 }...
Using AI Code Generation
1import { press } from 'cavy'2import { testHook } from 'cavy'3import { describe } from 'cavy'4import { it } from 'cavy'5import { expect } from 'cavy'6import { beforeAll } from 'cavy'7import { afterAll } from 'cavy'8import { beforeEach } from 'cavy'9import { afterEach } from 'cavy'10import { generateTestHook } from 'cavy'11import { hook } from 'cavy'12import { TestScope } from 'cavy'13import { SpecReporter } from 'cavy'14import { Text } from 'react-native'15import { TextInput } from 'react-native'16import { View } from 'react-native'17import { Alert } from 'react-native'18import { Button } from 'react-native'19import { Image } from 'react-native'20import { Keyboard } from 'react-native'21import { Picker } from 'react-native'22import { ScrollView } from 'react-native'23import { StyleSheet } from 'react-native'24import { TouchableOpacity } from 'react-native'25import { TouchableWithoutFeedback } from 'react-native'26import { Activity
Using AI Code Generation
1import { press } from 'cavy';2import { press } from 'cavy';3import { press } from 'cavy';4import { press } from 'cavy';5import { press } from 'cavy';6import { press } from 'cavy';7import { press } from 'cavy';8import { press } from 'cavy';9import { press } from 'cavy';10import { press } from 'cavy';11import { press } from 'cavy';12import { press } from 'cavy';13import { press } from 'cavy';14import { press } from 'cavy';15import { press } from 'cavy';
Using AI Code Generation
1class Test extends Component {2 render() {3 return (4 onPress={this.props.generateTestHook('Test.Button')}5 );6 }7}8export default withTestHook(Test);9describe('Test', () => {10 it('should press button', async () => {11 const testButton = await spec.findComponent('Test.Button');12 await spec.press(testButton);13 });14});
Using AI Code Generation
1import { press } from 'cavy';2const spec = {3 'Test Case Name': async function (test) {4 await press('Button')5 }6}7import { TestHook } from 'cavy';8const spec = {9 'Test Case Name': async function (test) {10 await press('Button')11 }12}13import { generateTestHook } from 'cavy';14const spec = {15 'Test Case Name': async function (test) {16 await press('Button')17 }18}19const TestHook = generateTestHook(spec);20export default TestHook;21import { fillIn } from 'cavy';22const spec = {23 'Test Case Name': async function (test) {24 await fillIn('TextInput', 'test')25 }26}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!