|
Blender V5.0
|
Go to the source code of this file.
Classes | |
| struct | KeyMapItem_Params |
Macros | |
| #define | KMI_PARAMS_MOD_TO_ANY(mod) |
| #define | KMI_PARAMS_MOD_FROM_ANY(mod) |
| #define KMI_PARAMS_MOD_FROM_ANY | ( | mod | ) |
Use to read modifiers from KeyMapItem_Params::modifier which can have any state (held or released).
Definition at line 89 of file WM_keymap.hh.
Referenced by keymap_event_set().
| #define KMI_PARAMS_MOD_TO_ANY | ( | mod | ) |
Use to assign modifiers to KeyMapItem_Params::modifier which can have any state (held or released).
Definition at line 84 of file WM_keymap.hh.
| const char * WM_bool_as_string | ( | bool | test | ) |
Definition at line 2133 of file wm_keymap.cc.
References IFACE_.
Referenced by blender::ed::transform::Bend().
| wmKeyMapItem * WM_key_event_operator | ( | const bContext * | C, |
| const char * | opname, | ||
| blender::wm::OpCallContext | opcontext, | ||
| IDProperty * | properties, | ||
| short | include_mask, | ||
| short | exclude_mask, | ||
| wmKeyMap ** | r_keymap ) |
| include_mask,exclude_mask | Event types to include/exclude when looking up keys (eEventType_Mask). |
Definition at line 1673 of file wm_keymap.cc.
References C, EVT_TYPE_MASK_ALL, kmi_filter_is_visible(), kmi_filter_is_visible_type_mask(), params, and wm_keymap_item_find().
Referenced by menu_change_shortcut(), remove_shortcut_func(), and ui_popup_context_menu_for_button().
| wmKeyMapItem * WM_key_event_operator_from_keymap | ( | wmKeyMap * | keymap, |
| const char * | opname, | ||
| IDProperty * | properties, | ||
| short | include_mask, | ||
| short | exclude_mask ) |
Definition at line 1689 of file wm_keymap.cc.
References EVT_TYPE_MASK_ALL, kmi_filter_is_visible(), kmi_filter_is_visible_type_mask(), params, and wm_keymap_item_find_in_keymap().
| std::optional< std::string > WM_key_event_operator_string | ( | const bContext * | C, |
| const char * | opname, | ||
| blender::wm::OpCallContext | opcontext, | ||
| IDProperty * | properties, | ||
| bool | is_strict ) |
Definition at line 1645 of file wm_keymap.cc.
References C, kmi_filter_is_visible(), params, wm_keymap_item_find(), and WM_keymap_item_to_string().
Referenced by but_shortcut_name_func(), uiLayout::op_menu_enum(), operator_search_update_fn(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_operator(), ui_but_event_operator_string_from_panel(), ui_but_event_property_operator_string(), ui_tooltip_data_from_gizmo(), and ui_tooltip_data_from_tool().
| const char * WM_key_event_string | ( | short | type, |
| bool | compact ) |
Definition at line 1095 of file wm_keymap.cc.
References BLF_default(), BLI_STR_UTF8_BLACK_DIAMOND_MINUS_WHITE_X, BLI_STR_UTF8_BROKEN_CIRCLE_WITH_NORTHWEST_ARROW, BLI_STR_UTF8_DOWNWARDS_ARROW, BLI_STR_UTF8_ERASE_TO_THE_LEFT, BLI_STR_UTF8_HORIZONTAL_TAB_KEY, BLI_STR_UTF8_LEFTWARDS_ARROW, BLI_STR_UTF8_OPEN_BOX, BLI_STR_UTF8_OPTION_KEY, BLI_STR_UTF8_PLACE_OF_INTEREST_SIGN, BLI_STR_UTF8_RETURN_SYMBOL, BLI_STR_UTF8_RIGHTWARDS_ARROW, BLI_STR_UTF8_UP_ARROWHEAD, BLI_STR_UTF8_UPWARDS_ARROW, BLI_STR_UTF8_UPWARDS_WHITE_ARROW, BLT_I18NCONTEXT_ID_WINDOWMANAGER, BLT_I18NCONTEXT_UI_EVENTS, CTX_IFACE_, CTX_N_, EnumPropertyItem::description, EVT_BACKSPACEKEY, EVT_DOWNARROWKEY, EVT_ESCKEY, EVT_LEFTALTKEY, EVT_LEFTARROWKEY, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_OSKEY, EVT_RETKEY, EVT_RIGHTALTKEY, EVT_RIGHTARROWKEY, EVT_RIGHTCTRLKEY, EVT_RIGHTSHIFTKEY, EVT_SPACEKEY, EVT_TABKEY, EVT_UPARROWKEY, i, IFACE_, key_event_glyph_or_text(), EnumPropertyItem::name, rna_enum_event_type_items, and RNA_enum_from_value().
Referenced by kmi_filter_is_visible(), ui_but_update_ex(), ui_do_but_HOTKEYEVT(), ui_do_but_KEYEVT(), uiTemplateEventFromKeymapItem(), and WM_keymap_item_raw_to_string().
| void WM_keyconfig_clear | ( | wmKeyConfig * | keyconf | ) |
Definition at line 351 of file wm_keymap.cc.
References BLI_listbase_clear(), wmKeyConfig::keymaps, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), and WM_keymap_clear().
Referenced by WM_keyconfig_ensure(), and WM_keyconfig_free().
| wmKeyConfig * WM_keyconfig_ensure | ( | wmWindowManager * | wm, |
| const char * | idname, | ||
| bool | user_defined ) |
Definition at line 306 of file wm_keymap.cc.
References BLI_findstring(), wmKeyConfig::keymaps, LISTBASE_FOREACH, offsetof, wmWindowManager::runtime, WM_keyconfig_clear(), WM_keyconfig_new(), and WM_keymap_clear().
| void WM_keyconfig_free | ( | wmKeyConfig * | keyconf | ) |
Definition at line 361 of file wm_keymap.cc.
References MEM_freeN(), and WM_keyconfig_clear().
Referenced by WM_keyconfig_remove(), and blender::bke::WindowManagerRuntime::~WindowManagerRuntime().
| void WM_keyconfig_init | ( | bContext * | C | ) |
Definition at line 416 of file wm.cc.
References C, CTX_py_init_get(), CTX_wm_manager(), ED_spacetypes_keymap(), G, wmWindowManager::init_flag, KEYCONF_INIT_DEFAULT, wmWindowManager::runtime, WM_INIT_FLAG_KEYCONFIG, WM_keyconfig_new(), WM_keyconfig_reload(), WM_KEYCONFIG_STR_DEFAULT, WM_keyconfig_update_tag(), and wm_window_keymap().
Referenced by WM_check(), and WM_init().
| wmKeyConfig * WM_keyconfig_new | ( | wmWindowManager * | wm, |
| const char * | idname, | ||
| bool | user_defined ) |
Definition at line 291 of file wm_keymap.cc.
References BLI_addtail(), BLI_assert, BLI_findstring(), wmKeyConfig::flag, wmKeyConfig::idname, KEYCONF_USER, MEM_callocN(), offsetof, wmWindowManager::runtime, and STRNCPY_UTF8.
Referenced by WM_keyconfig_ensure(), and WM_keyconfig_init().
| void WM_keyconfig_reload | ( | bContext * | C | ) |
Definition at line 406 of file wm.cc.
References BPY_run_string_eval(), C, CTX_py_init_get(), and G.
Referenced by WM_keyconfig_init(), and wm_userpref_update_when_changed().
| void WM_keyconfig_remove | ( | wmWindowManager * | wm, |
| wmKeyConfig * | keyconf ) |
Definition at line 329 of file wm_keymap.cc.
References ARRAY_SIZE, BLI_assert, BLI_findindex(), BLI_remlink(), i, wmKeyConfig::idname, wmWindowManager::runtime, STREQLEN, STRNCPY(), U, WM_KEYCONFIG_ARRAY_P, WM_keyconfig_free(), and WM_keyconfig_update_tag().
| void WM_keyconfig_set_active | ( | wmWindowManager * | wm, |
| const char * | idname ) |
Definition at line 382 of file wm_keymap.cc.
References wmWindowManager::init_flag, STRNCPY(), U, WM_INIT_FLAG_KEYCONFIG, WM_keyconfig_update(), and WM_keyconfig_update_tag().
| void WM_keyconfig_update | ( | wmWindowManager * | wm | ) |
Definition at line 1879 of file wm_keymap.cc.
References WM_keyconfig_update_ex().
Referenced by menu_add_shortcut(), wm_event_do_handlers(), wm_homefile_write_exec(), WM_keyconfig_set_active(), WM_keyconfig_update_ex(), WM_keymap_restore_to_default(), and wm_userpref_write_exec().
| void WM_keyconfig_update_ex | ( | wmWindowManager * | wm, |
| bool | keep_properties ) |
| keep_properties | When true, the properties for operators which cannot be found are kept. This is needed for operator reloading that validates key-map items for operators that may have their operators loaded back in the future, see: #113309. |
Definition at line 1884 of file wm_keymap.cc.
References bScreen::areabase, BLI_assert, ED_area_tag_redraw(), wmKeyMap::flag, KEYMAP_DIFF, KEYMAP_MODAL, LISTBASE_FOREACH, wmKeyMap::modal_items, wmKeyMap::poll, wmKeyMap::poll_modal_item, wmWindowManager::runtime, SPACE_USERPREF, U, USER_SECTION_KEYMAP, wmWindowManager::windows, WM_dropbox_update_ot(), WM_keyconfig_active(), WM_keyconfig_update(), WM_keyconfig_update_tag(), wm_keymap_diff_update(), wm_keymap_item_properties_set(), wm_keymap_item_properties_update_ot_from_list(), WM_keymap_list_find(), wm_keymap_patch_update(), wm_keymap_preset(), wm_keymap_test_and_clear_update(), wm_keymap_update_flag, WM_KEYMAP_UPDATE_OPERATORTYPE, WM_KEYMAP_UPDATE_POSTPONE, WM_KEYMAP_UPDATE_RECONFIGURE, wm_user_modal_keymap_set_items(), and WM_window_get_active_screen().
Referenced by WM_keyconfig_update(), and WM_keyconfig_update_on_startup().
| void WM_keyconfig_update_on_startup | ( | wmWindowManager * | wm | ) |
Definition at line 1868 of file wm_keymap.cc.
References WM_keyconfig_update_ex(), wm_keymap_update_flag, and WM_KEYMAP_UPDATE_OPERATORTYPE.
Referenced by WM_init().
| void WM_keyconfig_update_operatortype_tag | ( | ) |
Definition at line 1801 of file wm_keymap.cc.
References wm_keymap_update_flag, and WM_KEYMAP_UPDATE_OPERATORTYPE.
Referenced by wm_operatortype_append__end(), and WM_operatortype_remove_ptr().
| void WM_keyconfig_update_postpone_begin | ( | ) |
Definition at line 1833 of file wm_keymap.cc.
References wm_keymap_update_flag, and WM_KEYMAP_UPDATE_POSTPONE.
Referenced by WM_init().
| void WM_keyconfig_update_postpone_end | ( | ) |
Definition at line 1838 of file wm_keymap.cc.
References wm_keymap_update_flag, and WM_KEYMAP_UPDATE_POSTPONE.
Referenced by WM_init().
| void WM_keyconfig_update_suppress_begin | ( | ) |
Definition at line 1814 of file wm_keymap.cc.
References BLI_assert, wm_keymap_update_flag, wm_keymap_update_suppress_count, and wm_keymap_update_suppress_flag.
Referenced by ViewOpsData_Utility::ViewOpsData_Utility(), and ViewOpsData_Utility::~ViewOpsData_Utility().
| void WM_keyconfig_update_suppress_end | ( | ) |
Definition at line 1823 of file wm_keymap.cc.
References BLI_assert, wm_keymap_update_flag, wm_keymap_update_suppress_count, and wm_keymap_update_suppress_flag.
Referenced by ViewOpsData_Utility::ViewOpsData_Utility(), and ViewOpsData_Utility::~ViewOpsData_Utility().
| void WM_keyconfig_update_tag | ( | wmKeyMap * | keymap, |
| wmKeyMapItem * | kmi ) |
Definition at line 1788 of file wm_keymap.cc.
References wmKeyMap::flag, wmKeyMapItem::flag, KEYMAP_UPDATE, KMI_UPDATE, wm_keymap_update_flag, and WM_KEYMAP_UPDATE_RECONFIGURE.
Referenced by keymap_item_modified(), WM_keyconfig_init(), WM_keyconfig_remove(), WM_keyconfig_set_active(), WM_keyconfig_update_ex(), WM_keymap_add_item(), WM_keymap_add_item_copy(), WM_keymap_ensure(), WM_keymap_item_restore_to_default(), WM_keymap_remove_item(), WM_keymap_restore_to_default(), WM_modalkeymap_add_item(), and WM_modalkeymap_add_item_str().
| wmKeyMap * WM_keymap_active | ( | const wmWindowManager * | wm, |
| wmKeyMap * | keymap ) |
Definition at line 2031 of file wm_keymap.cc.
References wmKeyMap::idname, wmKeyMap::regionid, wmWindowManager::runtime, wmKeyMap::spaceid, and WM_keymap_list_find().
Referenced by blender::ed::transform::initTransform(), blender::ed::transform::initTransInfo(), WorkspaceStatus::opmodal(), v3d_cursor_is_snap_invert(), WM_event_get_keymaps_from_handler(), wm_event_modalkeymap_begin(), wm_gizmo_keymap_uses_event_modifier(), wm_handlers_do_gizmo_handler(), WM_modalkeymap_operator_items_to_string(), and WM_window_modal_keymap_status_draw().
| wmKeyMapItem * WM_keymap_add_item | ( | wmKeyMap * | keymap, |
| const char * | idname, | ||
| const KeyMapItem_Params * | params ) |
Always add item.
Definition at line 548 of file wm_keymap.cc.
References BLI_addtail(), wmKeyMapItem::idname, wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN(), params, STRNCPY(), WM_keyconfig_update_tag(), and wm_keymap_item_properties_set().
Referenced by menu_add_shortcut(), WM_gizmogroup_keymap_template_select_ex(), WM_keymap_add_menu(), WM_keymap_add_menu_pie(), WM_keymap_add_panel(), and WM_keymap_add_tool().
| wmKeyMapItem * WM_keymap_add_item_copy | ( | wmKeyMap * | keymap, |
| wmKeyMapItem * | kmi_src ) |
Definition at line 567 of file wm_keymap.cc.
References BLI_addtail(), wmKeyMap::items, keymap_item_set_id(), WM_keyconfig_update_tag(), and wm_keymap_item_copy().
Referenced by ViewOpsData_Utility::ViewOpsData_Utility().
| wmKeyMapItem * WM_keymap_add_menu | ( | wmKeyMap * | keymap, |
| const char * | idname, | ||
| const KeyMapItem_Params * | params ) |
Menu wrapper for WM_keymap_add_item.
Definition at line 33 of file wm_keymap_utils.cc.
References params, wmKeyMapItem::ptr, RNA_string_set(), and WM_keymap_add_item().
| wmKeyMapItem * WM_keymap_add_menu_pie | ( | wmKeyMap * | keymap, |
| const char * | idname, | ||
| const KeyMapItem_Params * | params ) |
Pie-menu wrapper for WM_keymap_add_item.
Definition at line 42 of file wm_keymap_utils.cc.
References params, wmKeyMapItem::ptr, RNA_string_set(), and WM_keymap_add_item().
| wmKeyMapItem * WM_keymap_add_panel | ( | wmKeyMap * | keymap, |
| const char * | idname, | ||
| const KeyMapItem_Params * | params ) |
Panel (popover) wrapper for WM_keymap_add_item.
Definition at line 51 of file wm_keymap_utils.cc.
References params, wmKeyMapItem::ptr, RNA_boolean_set(), RNA_string_set(), and WM_keymap_add_item().
| wmKeyMapItem * WM_keymap_add_tool | ( | wmKeyMap * | keymap, |
| const char * | idname, | ||
| const KeyMapItem_Params * | params ) |
Tool wrapper for WM_keymap_add_item.
Definition at line 62 of file wm_keymap_utils.cc.
References params, wmKeyMapItem::ptr, RNA_string_set(), and WM_keymap_add_item().
| void WM_keymap_clear | ( | wmKeyMap * | keymap | ) |
Definition at line 446 of file wm_keymap.cc.
References BLI_listbase_clear(), wmKeyMap::diff_items, wmKeyMap::items, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), wm_keymap_diff_item_free(), and wm_keymap_item_free_data().
Referenced by WM_keyconfig_clear(), WM_keyconfig_ensure(), wm_keymap_diff_update(), WM_keymap_item_restore_to_default(), wm_keymap_patch_update(), WM_keymap_remove(), WM_keymap_restore_to_default(), and ViewOpsData_Utility::~ViewOpsData_Utility().
| wmKeyMap * WM_keymap_ensure | ( | wmKeyConfig * | keyconf, |
| const char * | idname, | ||
| int | spaceid, | ||
| int | regionid ) |
Definition at line 895 of file wm_keymap.cc.
References BLI_addtail(), wmKeyConfig::keymaps, WM_keyconfig_update_tag(), WM_keymap_list_find(), and wm_keymap_new().
Referenced by action_buttons_area_init(), action_channel_region_init(), action_keymap(), action_main_region_init(), buttons_keymap(), buttons_main_region_init(), clip_channels_region_init(), clip_keymap(), clip_main_region_init(), clip_preview_region_init(), clip_properties_region_init(), clip_tools_region_init(), console_keymap(), console_main_region_init(), ed_default_handlers(), ED_keymap_anim(), ED_keymap_animchannels(), ED_keymap_armature(), ED_keymap_curve(), ED_keymap_gpencil_legacy(), ED_keymap_lattice(), ED_keymap_marker(), ED_keymap_mask(), ED_keymap_mesh(), ED_keymap_metaball(), ED_keymap_paint(), ED_keymap_screen(), ED_keymap_ui(), ED_keymap_uvedit(), ED_keymap_view2d(), ED_region_panels_init(), file_execution_region_init(), file_header_region_init(), file_keymap(), file_main_region_init(), file_tools_region_init(), file_ui_region_init(), graph_buttons_region_init(), graph_channel_region_init(), graph_main_region_init(), graphedit_keymap(), image_asset_shelf_region_init(), image_buttons_region_init(), image_keymap(), image_main_region_init(), image_tools_region_init(), info_keymap(), info_main_region_init(), blender::ed::curves::keymap_curves(), blender::ed::greasepencil::keymap_grease_pencil_brush_stroke(), blender::ed::greasepencil::keymap_grease_pencil_edit_mode(), blender::ed::greasepencil::keymap_grease_pencil_fill_tool(), blender::ed::greasepencil::keymap_grease_pencil_paint_mode(), blender::ed::greasepencil::keymap_grease_pencil_sculpt_mode(), blender::ed::greasepencil::keymap_grease_pencil_selection(), blender::ed::greasepencil::keymap_grease_pencil_vertex_paint_mode(), blender::ed::greasepencil::keymap_grease_pencil_weight_paint_mode(), blender::ed::object::keymap_object(), keymap_particle(), blender::ed::pointcloud::keymap_pointcloud(), nla_buttons_region_init(), nla_keymap(), nla_main_region_init(), nla_track_region_init(), blender::ed::space_node::node_asset_shelf_region_init(), blender::ed::space_node::node_buttons_region_init(), blender::ed::space_node::node_keymap(), blender::ed::space_node::node_main_region_init(), blender::ed::space_node::node_toolbar_region_init(), blender::ed::outliner::outliner_keymap(), blender::ed::outliner::outliner_main_region_init(), blender::ed::asset::shelf::region_init(), script_main_region_init(), blender::ed::vse::sequencer_buttons_region_init(), blender::ed::vse::sequencer_channel_region_init(), blender::ed::vse::sequencer_keymap(), blender::ed::vse::sequencer_main_region_init(), blender::ed::vse::sequencer_preview_region_init(), blender::ed::vse::sequencer_tools_region_init(), blender::ed::spreadsheet::spreadsheet_keymap(), blender::ed::spreadsheet::spreadsheet_main_region_init(), blender::ed::spreadsheet::spreadsheet_sidebar_init(), text_keymap(), text_main_region_init(), text_properties_region_init(), tool_generic_create_gizmo(), topbar_main_region_init(), view3d_asset_shelf_region_init(), view3d_buttons_region_init(), view3d_header_region_init(), view3d_keymap(), view3d_main_region_init(), view3d_tools_region_init(), WM_gizmo_keymap_generic_drag_with_keyconfig(), WM_gizmo_keymap_generic_maybe_drag_with_keyconfig(), WM_gizmo_keymap_generic_press_drag_with_keyconfig(), WM_gizmo_keymap_generic_select_with_keyconfig(), WM_gizmo_keymap_generic_with_keyconfig(), WM_gizmogroup_keymap_template_select_ex(), WM_modalkeymap_ensure(), wm_window_ghostwindow_ensure(), and wm_window_keymap().
| wmKeyMap * WM_keymap_find_all | ( | wmWindowManager * | wm, |
| const char * | idname, | ||
| int | spaceid, | ||
| int | regionid ) |
Definition at line 909 of file wm_keymap.cc.
References wmWindowManager::runtime, and WM_keymap_list_find().
Referenced by ViewOpsData_Utility::ViewOpsData_Utility(), WM_keymap_guess_from_context(), and WM_keymap_guess_opname().
| wmKeyMap * WM_keymap_find_all_spaceid_or_empty | ( | wmWindowManager * | wm, |
| const char * | idname, | ||
| int | spaceid, | ||
| int | regionid ) |
Definition at line 914 of file wm_keymap.cc.
References wmWindowManager::runtime, and WM_keymap_list_find_spaceid_or_empty().
| void WM_keymap_fix_linking | ( | ) |
Definition at line 584 of file wm_keymap_utils.cc.
Referenced by wm_window_keymap().
Definition at line 77 of file wm_keymap_utils.cc.
References BCONTEXT_TOOL, BLI_assert, C, CTX_data_mode_enum(), CTX_MODE_EDIT_ARMATURE, CTX_MODE_EDIT_CURVE, CTX_MODE_EDIT_CURVES, CTX_MODE_EDIT_GPENCIL_LEGACY, CTX_MODE_EDIT_GREASE_PENCIL, CTX_MODE_EDIT_LATTICE, CTX_MODE_EDIT_MESH, CTX_MODE_EDIT_METABALL, CTX_MODE_EDIT_POINTCLOUD, CTX_MODE_EDIT_SURFACE, CTX_MODE_EDIT_TEXT, CTX_MODE_OBJECT, CTX_MODE_PAINT_GPENCIL_LEGACY, CTX_MODE_PAINT_GREASE_PENCIL, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_PARTICLE, CTX_MODE_POSE, CTX_MODE_SCULPT, CTX_MODE_SCULPT_CURVES, CTX_MODE_SCULPT_GPENCIL_LEGACY, CTX_MODE_SCULPT_GREASE_PENCIL, CTX_MODE_VERTEX_GPENCIL_LEGACY, CTX_MODE_VERTEX_GREASE_PENCIL, CTX_MODE_WEIGHT_GPENCIL_LEGACY, CTX_MODE_WEIGHT_GREASE_PENCIL, CTX_wm_manager(), CTX_wm_space_data(), SpaceProperties::mainb, SpaceImage::mode, RGN_TYPE_WINDOW, SEQ_VIEW_PREVIEW, SEQ_VIEW_SEQUENCE, SEQ_VIEW_SEQUENCE_PREVIEW, SI_MODE_MASK, SI_MODE_PAINT, SI_MODE_UV, SI_MODE_VIEW, SPACE_EMPTY, SPACE_IMAGE, SPACE_PROPERTIES, SPACE_SEQ, SPACE_VIEW3D, SpaceLink::spacetype, SpaceSeq::view, view, and WM_keymap_find_all().
Referenced by WM_keymap_guess_opname().
Guess an appropriate key-map from the operator name.
Definition at line 224 of file wm_keymap_utils.cc.
References C, CTX_data_mode_enum(), CTX_MODE_EDIT_CURVES, CTX_MODE_EDIT_MESH, CTX_MODE_EDIT_POINTCLOUD, CTX_MODE_OBJECT, CTX_MODE_POSE, CTX_MODE_SCULPT, CTX_MODE_SCULPT_CURVES, CTX_wm_manager(), CTX_wm_region(), CTX_wm_space_data(), RGN_TYPE_UI, RGN_TYPE_WINDOW, SPACE_ACTION, SPACE_EMPTY, SPACE_GRAPH, SPACE_IMAGE, SPACE_NLA, SPACE_NODE, SPACE_PROPERTIES, SPACE_SEQ, SPACE_VIEW3D, SpaceLink::spacetype, STREQ, STRPREFIX, WM_keymap_find_all(), WM_keymap_guess_from_context(), and WM_keymap_poll().
Referenced by menu_add_shortcut(), menu_add_shortcut_cancel(), and ui_popup_context_menu_for_button().
| bool WM_keymap_item_compare | ( | const wmKeyMapItem * | k1, |
| const wmKeyMapItem * | k2 ) |
Definition at line 1704 of file wm_keymap.cc.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, wmKeyMapItem::direction, ELEM, wmKeyMapItem::flag, wmKeyMapItem::hyper, wmKeyMapItem::keymodifier, KM_ANY, KM_CLICK, KM_PRESS, KM_PRESS_DRAG, KM_RELEASE, KMI_INACTIVE, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and WM_userdef_event_map().
| wmKeyMapItem * WM_keymap_item_find_id | ( | wmKeyMap * | keymap, |
| int | id ) |
Definition at line 2144 of file wm_keymap.cc.
References wmKeyMap::items, and LISTBASE_FOREACH.
Referenced by menu_add_shortcut(), menu_add_shortcut_cancel(), wm_keymap_diff(), WM_keymap_item_find_match(), and WM_keymap_item_restore_to_default().
| wmKeyMapItem * WM_keymap_item_find_match | ( | wmKeyMap * | km_base, |
| wmKeyMap * | km_match, | ||
| wmKeyMapItem * | kmi_match, | ||
| ReportList * | reports ) |
Return the user key-map item from km_base based on km_match & kmi_match, currently the supported use case is looking up "User" key-map items from "Add-on" key-maps. Other lookups may be supported.
Definition at line 2155 of file wm_keymap.cc.
References BKE_report(), BKE_reportf(), BLI_findindex(), wmKeyMap::flag, G_MAIN, wmKeyMapItem::id, wmKeyMap::idname, wmKeyMap::items, KEYMAP_USER, wmKeyConfig::keymaps, wmKeyMap::kmi_id, wmKeyMap::regionid, RPT_ERROR, RPT_WARNING, wmWindowManager::runtime, wmKeyMap::spaceid, WM_keyconfig_active(), wm_keymap_is_match(), WM_keymap_item_find_id(), WM_keymap_list_find(), wm_keymap_preset(), and wm_keymap_update_flag.
| int WM_keymap_item_map_type_get | ( | const wmKeyMapItem * | kmi | ) |
Definition at line 223 of file wm_keymap.cc.
References ELEM, ISKEYBOARD, ISMOUSE, ISNDOF, ISTIMER, KM_TEXTINPUT, KMI_TYPE_KEYBOARD, KMI_TYPE_MOUSE, KMI_TYPE_NDOF, KMI_TYPE_TEXTINPUT, KMI_TYPE_TIMER, TABLET_ERASER, TABLET_STYLUS, and wmKeyMapItem::type.
| void WM_keymap_item_properties_reset | ( | wmKeyMapItem * | kmi, |
| IDProperty * | properties ) |
Properties can be NULL, otherwise the arg passed is used and ownership is given to the kmi.
Definition at line 206 of file wm_keymap.cc.
References IDP_FreeProperty(), LIKELY, wmKeyMapItem::properties, wmKeyMapItem::ptr, wm_keymap_item_properties_set(), and WM_operator_properties_free().
Referenced by keymap_update_brushes_handle_add_item(), keymap_update_brushes_handle_remove_item(), menu_add_shortcut(), and WM_keymap_item_restore_to_default().
| std::optional< std::string > WM_keymap_item_raw_to_string | ( | int8_t | shift, |
| int8_t | ctrl, | ||
| int8_t | alt, | ||
| int8_t | oskey, | ||
| int8_t | hyper, | ||
| short | keymodifier, | ||
| short | val, | ||
| short | type, | ||
| bool | compact ) |
Definition at line 1195 of file wm_keymap.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), EVT_HYPER, EVT_LEFTALTKEY, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_OSKEY, IFACE_, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), KM_DBL_CLICK, KM_MOD_HELD, KM_PRESS_DRAG, blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove_last(), and WM_key_event_string().
Referenced by WM_keymap_item_to_string().
| void WM_keymap_item_restore_to_default | ( | wmWindowManager * | wm, |
| wmKeyMap * | keymap, | ||
| wmKeyMapItem * | kmi ) |
Definition at line 2056 of file wm_keymap.cc.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, PointerRNA::data, wmKeyMapItem::flag, wmKeyMapItem::hyper, wmKeyMapItem::id, wmKeyMap::idname, wmKeyMapItem::idname, IDP_CopyProperty(), IDP_FreeProperty(), wmKeyMapItem::keymodifier, KMI_INACTIVE, KMI_REPEAT_IGNORE, wmKeyMapItem::maptype, MEM_freeN(), wmKeyMapItem::oskey, wmKeyMapItem::properties, wmKeyMapItem::propvalue, wmKeyMapItem::ptr, wmKeyMap::regionid, wmWindowManager::runtime, wmKeyMapItem::shift, wmKeyMap::spaceid, STREQ, STRNCPY(), wmKeyMapItem::type, wmKeyMapItem::val, WM_keyconfig_active(), WM_keyconfig_update_tag(), wm_keymap_addon_add(), WM_keymap_clear(), wm_keymap_copy(), WM_keymap_item_find_id(), WM_keymap_item_properties_reset(), WM_keymap_list_find(), and wm_keymap_preset().
| std::optional< std::string > WM_keymap_item_to_string | ( | const wmKeyMapItem * | kmi, |
| bool | compact ) |
Definition at line 1255 of file wm_keymap.cc.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, wmKeyMapItem::hyper, wmKeyMapItem::keymodifier, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and WM_keymap_item_raw_to_string().
Referenced by keymap_handler_log_kmi_event_str(), menu_items_from_ui_create(), ui_but_update_ex(), ui_item_with_label(), ui_tooltip_data_from_tool(), WM_key_event_operator_string(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), and WM_modalkeymap_items_to_string().
Definition at line 866 of file wm_keymap.cc.
References KMAP_MAX_NAME, LISTBASE_FOREACH, and STREQLEN.
Referenced by WM_keyconfig_update_ex(), WM_keymap_active(), wm_keymap_diff_update(), WM_keymap_ensure(), WM_keymap_find_all(), WM_keymap_item_find_match(), WM_keymap_item_restore_to_default(), wm_keymap_patch_update(), wm_keymap_preset(), WM_keymap_restore_to_default(), WM_modalkeymap_ensure(), and wm_user_modal_keymap_set_items().
| wmKeyMap * WM_keymap_list_find_spaceid_or_empty | ( | ListBase * | lb, |
| const char * | idname, | ||
| int | spaceid, | ||
| int | regionid ) |
Definition at line 879 of file wm_keymap.cc.
References ELEM, KMAP_MAX_NAME, LISTBASE_FOREACH, SPACE_EMPTY, and STREQLEN.
Referenced by wm_event_get_keymap_from_toolsystem_ex(), and WM_keymap_find_all_spaceid_or_empty().
Definition at line 470 of file wm_keymap.cc.
References BKE_workspace_owner_id_check(), BLI_listbase_is_empty(), BLI_str_endswith(), C, CLOG_WARN, CTX_wm_workspace(), wmKeyMap::idname, wmKeyMap::items, wmKeyMap::owner_id, wmKeyMap::poll, STREQ, U, UNLIKELY, and WM_LOG_EVENTS.
Referenced by menu_types_add_from_keymap_items(), WM_event_match_keymap_item_from_handlers(), wm_handlers_do_keymap_with_gizmo_handler(), wm_handlers_do_keymap_with_keymap_handler(), WM_keymap_guess_opname(), and wm_keymap_item_find_handlers().
| void WM_keymap_remove | ( | wmKeyConfig * | keyconf, |
| wmKeyMap * | keymap ) |
Definition at line 462 of file wm_keymap.cc.
References BLI_assert, BLI_findindex(), BLI_remlink(), wmKeyConfig::keymaps, MEM_freeN(), and WM_keymap_clear().
Referenced by WM_gizmomaptype_group_unlink().
| void WM_keymap_remove_item | ( | wmKeyMap * | keymap, |
| wmKeyMapItem * | kmi ) |
Definition at line 580 of file wm_keymap.cc.
References BLI_assert, BLI_findindex(), BLI_freelinkN(), IDP_FreeProperty(), wmKeyMap::items, wmKeyMapItem::properties, wmKeyMapItem::ptr, WM_keyconfig_update_tag(), and WM_operator_properties_free().
Referenced by menu_add_shortcut_cancel(), and remove_shortcut_func().
| void WM_keymap_restore_to_default | ( | wmKeyMap * | keymap, |
| wmWindowManager * | wm ) |
Definition at line 2118 of file wm_keymap.cc.
References BLI_freelinkN(), wmKeyMap::idname, wmKeyMap::regionid, wmKeyMap::spaceid, U, WM_keyconfig_update(), WM_keyconfig_update_tag(), WM_keymap_clear(), and WM_keymap_list_find().
| bool WM_keymap_uses_event_modifier | ( | const wmKeyMap * | keymap, |
| int | event_modifier ) |
Definition at line 572 of file wm_keymap_utils.cc.
References wmKeyMap::items, KMI_INACTIVE, LISTBASE_FOREACH, and wm_keymap_item_uses_modifier().
Referenced by wm_gizmo_keymap_uses_event_modifier().
| wmKeyMapItem * WM_modalkeymap_add_item | ( | wmKeyMap * | km, |
| const KeyMapItem_Params * | params, | ||
| int | value ) |
Definition at line 972 of file wm_keymap.cc.
References BLI_addtail(), wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN(), params, wmKeyMapItem::propvalue, and WM_keyconfig_update_tag().
Referenced by wm_gizmogroup_tweak_modal_keymap().
| wmKeyMapItem * WM_modalkeymap_add_item_str | ( | wmKeyMap * | km, |
| const KeyMapItem_Params * | params, | ||
| const char * | value ) |
Definition at line 988 of file wm_keymap.cc.
References BLI_addtail(), wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN(), params, wmKeyMapItem::propvalue_str, STRNCPY(), and WM_keyconfig_update_tag().
| void WM_modalkeymap_assign | ( | wmKeyMap * | km, |
| const char * | opname ) |
Definition at line 1030 of file wm_keymap.cc.
References CLOG_ERROR, ot, WM_LOG_OPERATORS, and WM_operatortype_find().
Referenced by bevel_modal_keymap(), curve_pen_modal_keymap(), blender::ed::curves::ED_curves_pentool_modal_keymap(), ED_filltool_modal_keymap(), ED_grease_pencil_pentool_modal_keymap(), ED_interpolatetool_modal_keymap(), ED_keymap_paint(), ED_primitivetool_modal_keymap(), eyedropper_colorband_modal_keymap(), eyedropper_modal_keymap(), fly_modal_keymap(), gesture_box_modal_keymap(), gesture_circle_modal_keymap(), gesture_lasso_modal_keymap(), gesture_polyline_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), keymap_modal_set(), blender::ed::transform::keymap_transform(), knifetool_modal_keymap(), blender::ed::sculpt_paint::expand::modal_keymap(), blender::ed::sculpt_paint::filter::modal_keymap(), blender::ed::space_node::node_link_modal_keymap(), blender::ed::space_node::node_resize_modal_keymap(), point_normals_modal_keymap(), blender::ed::vse::slip_modal_keymap(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewplace_modal_keymap(), viewrotate_modal_keymap(), viewzoom_modal_keymap(), walk_modal_keymap(), and wm_gizmogroup_tweak_modal_keymap().
| wmKeyMap * WM_modalkeymap_ensure | ( | wmKeyConfig * | keyconf, |
| const char * | idname, | ||
| const EnumPropertyItem * | items ) |
Definition at line 932 of file wm_keymap.cc.
References wmKeyMap::flag, G_MAIN, wmKeyMap::idname, KEYMAP_MODAL, wmKeyMap::modal_items, wmKeyMap::poll, wmKeyMap::poll_modal_item, RGN_TYPE_WINDOW, wmWindowManager::runtime, SPACE_EMPTY, WM_keymap_ensure(), and WM_keymap_list_find().
Referenced by bevel_modal_keymap(), curve_pen_modal_keymap(), ED_filltool_modal_keymap(), ED_interpolatetool_modal_keymap(), ED_primitivetool_modal_keymap(), blender::ed::curves::pen_tool::ensure_keymap(), eyedropper_colorband_modal_keymap(), eyedropper_modal_keymap(), fly_modal_keymap(), gesture_box_modal_keymap(), gesture_circle_modal_keymap(), gesture_lasso_modal_keymap(), gesture_polyline_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), keymap_modal_set(), knifetool_modal_keymap(), blender::ed::sculpt_paint::expand::modal_keymap(), blender::ed::sculpt_paint::filter::modal_keymap(), blender::ed::space_node::node_link_modal_keymap(), blender::ed::space_node::node_resize_modal_keymap(), blender::ed::sculpt_paint::paint_stroke_modal_keymap(), point_normals_modal_keymap(), blender::ed::vse::slip_modal_keymap(), blender::ed::transform::transform_modal_keymap(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewplace_modal_keymap(), viewrotate_modal_keymap(), viewzoom_modal_keymap(), walk_modal_keymap(), and wm_gizmogroup_tweak_modal_keymap().
| wmKeyMap * WM_modalkeymap_find | ( | wmKeyConfig * | keyconf, |
| const char * | idname ) |
Definition at line 959 of file wm_keymap.cc.
References KEYMAP_MODAL, wmKeyConfig::keymaps, KMAP_MAX_NAME, LISTBASE_FOREACH, and STREQLEN.
Referenced by bevel_modal_keymap(), curve_pen_modal_keymap(), ED_filltool_modal_keymap(), ED_interpolatetool_modal_keymap(), ED_primitivetool_modal_keymap(), blender::ed::curves::pen_tool::ensure_keymap(), eyedropper_colorband_modal_keymap(), eyedropper_modal_keymap(), fly_modal_keymap(), gesture_box_modal_keymap(), gesture_circle_modal_keymap(), gesture_lasso_modal_keymap(), gesture_polyline_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), knifetool_modal_keymap(), blender::ed::sculpt_paint::expand::modal_keymap(), blender::ed::sculpt_paint::filter::modal_keymap(), blender::ed::space_node::node_link_modal_keymap(), blender::ed::space_node::node_resize_modal_keymap(), blender::ed::sculpt_paint::paint_stroke_modal_keymap(), point_normals_modal_keymap(), blender::ed::vse::slip_modal_keymap(), v3d_cursor_snap_activate(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewplace_modal_keymap(), viewrotate_modal_keymap(), viewzoom_modal_keymap(), walk_modal_keymap(), and wm_gizmogroup_tweak_modal_keymap().
| const wmKeyMapItem * WM_modalkeymap_find_propvalue | ( | const wmKeyMap * | km, |
| int | propvalue ) |
Definition at line 1025 of file wm_keymap.cc.
References wm_modalkeymap_find_propvalue_iter().
Referenced by blender::ed::transform::initShrinkFatten(), WorkspaceStatus::opmodal(), and WM_modalkeymap_items_to_string().
| std::optional< std::string > WM_modalkeymap_items_to_string | ( | const wmKeyMap * | km, |
| int | propvalue, | ||
| bool | compact ) |
Definition at line 1268 of file wm_keymap.cc.
References result, WM_keymap_item_to_string(), WM_modalkeymap_find_propvalue(), and wm_modalkeymap_find_propvalue_iter().
Referenced by WM_modalkeymap_operator_items_to_string().
| std::optional< std::string > WM_modalkeymap_operator_items_to_string | ( | wmOperatorType * | ot, |
| int | propvalue, | ||
| bool | compact ) |
Definition at line 1290 of file wm_keymap.cc.
References G_MAIN, ot, WM_keymap_active(), and WM_modalkeymap_items_to_string().
Referenced by knife_update_header(), and WM_window_modal_keymap_status_draw().