|
Blender V5.0
|
#include <cstring>#include <fmt/format.h>#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_userdef_types.h"#include "DNA_windowmanager_types.h"#include "DNA_workspace_types.h"#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLF_api.hh"#include "UI_interface.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_idprop.hh"#include "BKE_main.hh"#include "BKE_report.hh"#include "BKE_screen.hh"#include "BKE_workspace.hh"#include "BLT_translation.hh"#include "RNA_access.hh"#include "RNA_enum_types.hh"#include "WM_api.hh"#include "WM_keymap.hh"#include "WM_types.hh"#include "wm_event_system.hh"#include "wm_event_types.hh"#include "ED_screen.hh"Go to the source code of this file.
Classes | |
| struct | wmKeyMapItemFind_Params |
Functions | |
Keymap Item | |
Item in a keymap, that maps from an event to an operator or modal map item. | |
| static wmKeyMapItem * | wm_keymap_item_copy (wmKeyMapItem *kmi) |
| static void | wm_keymap_item_free_data (wmKeyMapItem *kmi) |
| static void | wm_keymap_item_clear_runtime (wmKeyMapItem *kmi) |
| static void | wm_keymap_item_properties_set (wmKeyMapItem *kmi) |
| static void | wm_keymap_item_properties_update_ot (wmKeyMapItem *kmi, const bool keep_properties) |
| static void | wm_keymap_item_properties_update_ot_from_list (ListBase *km_lb, const bool keep_properties) |
| static bool | wm_keymap_item_equals_result (wmKeyMapItem *a, wmKeyMapItem *b) |
| static bool | wm_keymap_item_equals (wmKeyMapItem *a, wmKeyMapItem *b) |
| void | WM_keymap_item_properties_reset (wmKeyMapItem *kmi, IDProperty *properties) |
| int | WM_keymap_item_map_type_get (const wmKeyMapItem *kmi) |
Keymap Diff Item | |
Item in a diff keymap, used for saving diff of keymaps in user preferences. | |
| static wmKeyMapDiffItem * | wm_keymap_diff_item_copy (wmKeyMapDiffItem *kmdi) |
| static void | wm_keymap_diff_item_free (wmKeyMapDiffItem *kmdi) |
Key Configuration | |
List of keymaps for all editors, modes, etc. There is a builtin default key configuration, a user key configuration, and other preset configurations. | |
| wmKeyConfig * | WM_keyconfig_new (wmWindowManager *wm, const char *idname, bool user_defined) |
| wmKeyConfig * | WM_keyconfig_ensure (wmWindowManager *wm, const char *idname, bool user_defined) |
| void | WM_keyconfig_remove (wmWindowManager *wm, wmKeyConfig *keyconf) |
| void | WM_keyconfig_clear (wmKeyConfig *keyconf) |
| void | WM_keyconfig_free (wmKeyConfig *keyconf) |
| static wmKeyConfig * | WM_keyconfig_active (wmWindowManager *wm) |
| void | WM_keyconfig_set_active (wmWindowManager *wm, const char *idname) |
Keymap | |
List of keymap items for one editor, mode, modal operator. | |
| static wmKeyMap * | wm_keymap_new (const char *idname, int spaceid, int regionid) |
| static wmKeyMap * | wm_keymap_copy (wmKeyMap *keymap) |
| void | WM_keymap_clear (wmKeyMap *keymap) |
| void | WM_keymap_remove (wmKeyConfig *keyconf, wmKeyMap *keymap) |
| bool | WM_keymap_poll (bContext *C, wmKeyMap *keymap) |
| static bool | wm_keymap_is_match (const wmKeyMap *km_a, const wmKeyMap *km_b) |
| static void | keymap_event_set (wmKeyMapItem *kmi, const KeyMapItem_Params *params) |
| static void | keymap_item_set_id (wmKeyMap *keymap, wmKeyMapItem *kmi) |
| wmKeyMapItem * | WM_keymap_add_item (wmKeyMap *keymap, const char *idname, const KeyMapItem_Params *params) |
| wmKeyMapItem * | WM_keymap_add_item_copy (wmKeyMap *keymap, wmKeyMapItem *kmi_src) |
| void | WM_keymap_remove_item (wmKeyMap *keymap, wmKeyMapItem *kmi) |
Keymap Diff and Patch | |
Rather than saving the entire keymap for user preferences, we only save a diff so that changes in the defaults get synced. This system is not perfect but works better than overriding the keymap entirely when only few items are changed. | |
| static void | wm_keymap_addon_add (wmKeyMap *keymap, wmKeyMap *addonmap) |
| static wmKeyMapItem * | wm_keymap_find_item_equals (wmKeyMap *km, wmKeyMapItem *needle) |
| static wmKeyMapItem * | wm_keymap_find_item_equals_result (wmKeyMap *km, wmKeyMapItem *needle) |
| static void | wm_keymap_diff (wmKeyMap *diff_km, wmKeyMap *from_km, wmKeyMap *to_km, wmKeyMap *orig_km, wmKeyMap *addon_km) |
| static void | wm_keymap_patch (wmKeyMap *km, wmKeyMap *diff_km) |
| static wmKeyMap * | wm_keymap_patch_update (ListBase *lb, wmKeyMap *defaultmap, wmKeyMap *addonmap, wmKeyMap *usermap) |
| static void | wm_keymap_diff_update (ListBase *lb, wmKeyMap *defaultmap, wmKeyMap *addonmap, wmKeyMap *km) |
Storage in WM | |
Name id's are for storing general or multiple keymaps.
| |
| wmKeyMap * | WM_keymap_list_find (ListBase *lb, const char *idname, int spaceid, int regionid) |
| wmKeyMap * | WM_keymap_list_find_spaceid_or_empty (ListBase *lb, const char *idname, int spaceid, int regionid) |
| wmKeyMap * | WM_keymap_ensure (wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid) |
| wmKeyMap * | WM_keymap_find_all (wmWindowManager *wm, const char *idname, int spaceid, int regionid) |
| wmKeyMap * | WM_keymap_find_all_spaceid_or_empty (wmWindowManager *wm, const char *idname, int spaceid, int regionid) |
Modal Keymaps | |
Modal key-maps get linked to a running operator, and filter the keys before sending to wmOperatorType.modal callback. | |
| wmKeyMap * | WM_modalkeymap_ensure (wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items) |
| wmKeyMap * | WM_modalkeymap_find (wmKeyConfig *keyconf, const char *idname) |
| wmKeyMapItem * | WM_modalkeymap_add_item (wmKeyMap *km, const KeyMapItem_Params *params, int value) |
| wmKeyMapItem * | WM_modalkeymap_add_item_str (wmKeyMap *km, const KeyMapItem_Params *params, const char *value) |
| static const wmKeyMapItem * | wm_modalkeymap_find_propvalue_iter (const wmKeyMap *km, const wmKeyMapItem *kmi, const int propvalue) |
| const wmKeyMapItem * | WM_modalkeymap_find_propvalue (const wmKeyMap *km, const int propvalue) |
| void | WM_modalkeymap_assign (wmKeyMap *km, const char *opname) |
| static void | wm_user_modal_keymap_set_items (wmWindowManager *wm, wmKeyMap *km) |
Text from Key Events | |
| static const char * | key_event_glyph_or_text (const int font_id, const char *text, const char *single_glyph) |
| const char * | WM_key_event_string (const short type, const bool compact) |
| std::optional< std::string > | WM_keymap_item_raw_to_string (const int8_t shift, const int8_t ctrl, const int8_t alt, const int8_t oskey, const int8_t hyper, const short keymodifier, const short val, const short type, const bool compact) |
| std::optional< std::string > | WM_keymap_item_to_string (const wmKeyMapItem *kmi, const bool compact) |
| std::optional< std::string > | WM_modalkeymap_items_to_string (const wmKeyMap *km, const int propvalue, const bool compact) |
| std::optional< std::string > | WM_modalkeymap_operator_items_to_string (wmOperatorType *ot, const int propvalue, const bool compact) |
Keymap Finding Utilities | |
| static wmKeyMapItem * | wm_keymap_item_find_in_keymap (wmKeyMap *keymap, const char *opname, IDProperty *properties, const bool is_strict, const wmKeyMapItemFind_Params *params) |
| static wmKeyMapItem * | wm_keymap_item_find_handlers (const bContext *C, wmWindowManager *wm, wmWindow *win, ListBase *handlers, const char *opname, blender::wm::OpCallContext, IDProperty *properties, const bool is_strict, const wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap) |
| static wmKeyMapItem * | wm_keymap_item_find_props (const bContext *C, const char *opname, blender::wm::OpCallContext opcontext, IDProperty *properties, const bool is_strict, const wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap) |
| static wmKeyMapItem * | wm_keymap_item_find (const bContext *C, const char *opname, blender::wm::OpCallContext opcontext, IDProperty *properties, bool is_strict, const wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap) |
| static bool | kmi_filter_is_visible (const wmKeyMap *, const wmKeyMapItem *kmi, void *) |
| std::optional< std::string > | WM_key_event_operator_string (const bContext *C, const char *opname, blender::wm::OpCallContext opcontext, IDProperty *properties, const bool is_strict) |
| static bool | kmi_filter_is_visible_type_mask (const wmKeyMap *km, const wmKeyMapItem *kmi, void *user_data) |
| wmKeyMapItem * | WM_key_event_operator (const bContext *C, const char *opname, blender::wm::OpCallContext opcontext, IDProperty *properties, const short include_mask, const short exclude_mask, wmKeyMap **r_keymap) |
| wmKeyMapItem * | WM_key_event_operator_from_keymap (wmKeyMap *keymap, const char *opname, IDProperty *properties, const short include_mask, const short exclude_mask) |
| bool | WM_keymap_item_compare (const wmKeyMapItem *k1, const wmKeyMapItem *k2) |
Event Handling | |
Handlers have pointers to the keymap in the default configuration. During event handling this function is called to get the keymap from the final configuration. | |
| wmKeyMap * | WM_keymap_active (const wmWindowManager *wm, wmKeyMap *keymap) |
Keymap Editor | |
In the keymap editor the user key configuration is edited. | |
| void | WM_keymap_item_restore_to_default (wmWindowManager *wm, wmKeyMap *keymap, wmKeyMapItem *kmi) |
| void | WM_keymap_restore_to_default (wmKeyMap *keymap, wmWindowManager *wm) |
| const char * | WM_bool_as_string (bool test) |
Keymap Queries | |
| wmKeyMapItem * | WM_keymap_item_find_id (wmKeyMap *keymap, int id) |
| wmKeyMapItem * | WM_keymap_item_find_match (wmKeyMap *km_base, wmKeyMap *km_match, wmKeyMapItem *kmi_match, ReportList *reports) |
Configurable key-maps - add/remove/find/compare/patch...
Definition in file wm_keymap.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| WM_KEYMAP_UPDATE_RECONFIGURE | |
| WM_KEYMAP_UPDATE_OPERATORTYPE | |
| WM_KEYMAP_UPDATE_POSTPONE | |
Definition at line 1772 of file wm_keymap.cc.
|
static |
Definition at line 1085 of file wm_keymap.cc.
References BLF_has_glyph(), BLI_assert, BLI_str_utf8_as_unicode_or_error(), and BLI_strlen_utf8().
Referenced by WM_key_event_string().
|
static |
Definition at line 512 of file wm_keymap.cc.
References wmKeyMapItem::alt, BLI_assert, wmKeyMapItem::ctrl, wmKeyMapItem::direction, wmKeyMapItem::hyper, wmKeyMapItem::keymodifier, KM_ALT, KM_ANY, KM_CTRL, KM_HYPER, KM_MOD_HELD, KM_NOTHING, KM_OSKEY, KM_SHIFT, KMI_PARAMS_MOD_FROM_ANY, mod, wmKeyMapItem::oskey, params, wmKeyMapItem::shift, wmKeyMapItem::type, and wmKeyMapItem::val.
Referenced by WM_keymap_add_item(), WM_modalkeymap_add_item(), and WM_modalkeymap_add_item_str().
|
static |
Definition at line 537 of file wm_keymap.cc.
References wmKeyMap::flag, wmKeyMapItem::id, KEYMAP_USER, and wmKeyMap::kmi_id.
Referenced by WM_keymap_add_item(), WM_keymap_add_item_copy(), wm_keymap_addon_add(), wm_keymap_patch(), WM_modalkeymap_add_item(), and WM_modalkeymap_add_item_str().
|
static |
Definition at line 1637 of file wm_keymap.cc.
References IS_EVENT_ACTIONZONE, wmKeyMapItem::type, and WM_key_event_string().
Referenced by kmi_filter_is_visible_type_mask(), WM_key_event_operator(), WM_key_event_operator_from_keymap(), and WM_key_event_operator_string().
|
static |
Definition at line 1663 of file wm_keymap.cc.
References kmi_filter_is_visible(), wmKeyMapItem::type, and WM_event_type_mask_test().
Referenced by WM_key_event_operator(), and WM_key_event_operator_from_keymap().
| 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, | ||
| const short | include_mask, | ||
| const 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, | ||
| const 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 | ( | const short | type, |
| const 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().
|
static |
Definition at line 367 of file wm_keymap.cc.
References BLI_findstring(), offsetof, wmWindowManager::runtime, and U.
Referenced by WM_keyconfig_update_ex(), WM_keymap_item_find_match(), WM_keymap_item_restore_to_default(), and wm_keymap_preset().
| 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().
| 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_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().
Definition at line 606 of file wm_keymap.cc.
References BLI_addhead(), wmKeyMap::items, keymap_item_set_id(), LISTBASE_FOREACH, and wm_keymap_item_copy().
Referenced by wm_keymap_diff_update(), WM_keymap_item_restore_to_default(), and wm_keymap_patch_update().
| 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().
Definition at line 423 of file wm_keymap.cc.
References BLI_addtail(), BLI_listbase_clear(), wmKeyMap::diff_items, wmKeyMap::flag, wmKeyMap::items, KEYMAP_EXPANDED, KEYMAP_UPDATE, LISTBASE_FOREACH, MEM_dupallocN(), wmKeyMap::modal_items, wmKeyMap::poll, wmKeyMap::poll_modal_item, wm_keymap_diff_item_copy(), and wm_keymap_item_copy().
Referenced by wm_keymap_diff_update(), WM_keymap_item_restore_to_default(), and wm_keymap_patch_update().
|
static |
Definition at line 637 of file wm_keymap.cc.
References wmKeyMapDiffItem::add_item, BLI_addtail(), wmKeyMap::diff_items, wmKeyMapItem::flag, wmKeyMap::items, KMI_EXPANDED, LISTBASE_FOREACH, MEM_callocN(), wmKeyMapDiffItem::remove_item, wm_keymap_find_item_equals(), wm_keymap_item_copy(), wm_keymap_item_equals(), and WM_keymap_item_find_id().
Referenced by wm_keymap_diff_update().
|
static |
Definition at line 254 of file wm_keymap.cc.
References wmKeyMapDiffItem::add_item, MEM_dupallocN(), wmKeyMapDiffItem::next, wmKeyMapDiffItem::prev, wmKeyMapDiffItem::remove_item, and wm_keymap_item_copy().
Referenced by wm_keymap_copy().
|
static |
Definition at line 269 of file wm_keymap.cc.
References wmKeyMapDiffItem::add_item, MEM_freeN(), wmKeyMapDiffItem::remove_item, and wm_keymap_item_free_data().
Referenced by WM_keymap_clear().
|
static |
Definition at line 811 of file wm_keymap.cc.
References BLI_addtail(), BLI_freelinkN(), wmKeyMap::diff_items, ListBase::first, wmKeyMap::flag, wmKeyMap::idname, KEYMAP_DIFF, KEYMAP_MODAL, MEM_freeN(), wmKeyMap::regionid, wmKeyMap::spaceid, wm_keymap_addon_add(), WM_keymap_clear(), wm_keymap_copy(), wm_keymap_diff(), WM_keymap_list_find(), and wm_keymap_new().
Referenced by WM_keyconfig_update_ex().
| 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().
|
static |
Definition at line 615 of file wm_keymap.cc.
References wmKeyMap::items, LISTBASE_FOREACH, and wm_keymap_item_equals().
Referenced by wm_keymap_diff(), wm_keymap_patch(), and wm_keymap_patch_update().
|
static |
Definition at line 626 of file wm_keymap.cc.
References wmKeyMap::items, LISTBASE_FOREACH, and wm_keymap_item_equals_result().
Referenced by wm_keymap_patch(), and wm_keymap_patch_update().
Definition at line 506 of file wm_keymap.cc.
References wmKeyMap::idname, wmKeyMap::regionid, wmKeyMap::spaceid, and STREQ.
Referenced by WM_keymap_item_find_match().
|
static |
Definition at line 104 of file wm_keymap.cc.
References PointerRNA::data, wmKeyMapItem::properties, wmKeyMapItem::ptr, and wm_keymap_item_free_data().
Referenced by wm_keymap_item_properties_update_ot().
| 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().
|
static |
Definition at line 64 of file wm_keymap.cc.
References PointerRNA::data, wmKeyMapItem::flag, wmKeyMapItem::idname, IDP_CopyProperty(), KMI_UPDATE, MEM_dupallocN(), wmKeyMapItem::next, PointerRNA::owner_id, wmKeyMapItem::prev, wmKeyMapItem::properties, wmKeyMapItem::ptr, and WM_operator_properties_create().
Referenced by WM_keymap_add_item_copy(), wm_keymap_addon_add(), wm_keymap_copy(), wm_keymap_diff(), wm_keymap_diff_item_copy(), and wm_keymap_patch().
|
static |
Definition at line 196 of file wm_keymap.cc.
References wmKeyMapItem::alt, b, wmKeyMapItem::ctrl, wmKeyMapItem::direction, wmKeyMapItem::flag, wmKeyMapItem::hyper, ISKEYBOARD, wmKeyMapItem::keymodifier, KM_PRESS_DRAG, KMI_REPEAT_IGNORE, wmKeyMapItem::maptype, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and wm_keymap_item_equals_result().
Referenced by wm_keymap_diff(), and wm_keymap_find_item_equals().
|
static |
Definition at line 188 of file wm_keymap.cc.
References b, wmKeyMapItem::flag, G_MAIN, wmKeyMapItem::idname, KMI_INACTIVE, wmKeyMapItem::propvalue, wmKeyMapItem::ptr, RNA_EQ_UNSET_MATCH_NONE, RNA_struct_equals(), and STREQ.
Referenced by wm_keymap_find_item_equals_result(), and wm_keymap_item_equals().
|
static |
Definition at line 1549 of file wm_keymap.cc.
References C, PointerRNA::data, G, G_DEBUG_WM, wmKeyMap::idname, IDP_CopyProperty(), IDP_FreeProperty(), IDP_print(), OPTYPE_MACRO, ot, params, printf, wmKeyMapItem::ptr, RNA_pointer_create_discrete(), RNA_property_is_set(), RNA_property_unset(), wm_keymap_item_find_props(), WM_keymap_item_to_string(), WM_operator_properties_default(), and WM_operatortype_find().
Referenced by WM_key_event_operator(), and WM_key_event_operator_string().
|
static |
Definition at line 1388 of file wm_keymap.cc.
References C, wmEventHandler_KeymapResult::keymaps, wmEventHandler_KeymapResult::keymaps_len, LISTBASE_FOREACH, params, WM_event_get_keymaps_from_handler(), WM_HANDLER_TYPE_KEYMAP, wm_keymap_item_find_in_keymap(), and WM_keymap_poll().
Referenced by wm_keymap_item_find_props().
| 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().
|
static |
Definition at line 1305 of file wm_keymap.cc.
References G, G_DEBUG_WM, wmKeyMap::idname, IDP_CopyProperty(), IDP_EqualsProperties_ex(), IDP_FreeProperty(), IDP_print(), wmKeyMap::items, KMI_INACTIVE, LISTBASE_FOREACH, ot, params, printf, RNA_pointer_create_discrete(), STREQ, WM_keymap_item_to_string(), WM_operator_properties_default(), and WM_operatortype_find().
Referenced by WM_key_event_operator_from_keymap(), and wm_keymap_item_find_handlers().
| 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.
|
static |
Definition at line 1427 of file wm_keymap.cc.
References BKE_area_find_region_type(), C, CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), ELEM, blender::wm::ExecRegionChannels, blender::wm::ExecRegionPreview, blender::wm::ExecRegionWin, ScrArea::handlers, wmWindow::handlers, blender::wm::InvokeRegionChannels, blender::wm::InvokeRegionPreview, blender::wm::InvokeRegionWin, wmWindow::modalhandlers, params, ARegion::regiontype, RGN_TYPE_CHANNELS, RGN_TYPE_PREVIEW, RGN_TYPE_WINDOW, ARegion::runtime, and wm_keymap_item_find_handlers().
Referenced by wm_keymap_item_find().
|
static |
Definition at line 89 of file wm_keymap.cc.
References IDP_FreeProperty(), wmKeyMapItem::properties, wmKeyMapItem::ptr, and WM_operator_properties_free().
Referenced by WM_keymap_clear(), wm_keymap_diff_item_free(), wm_keymap_item_clear_runtime(), wm_keymap_item_properties_update_ot(), and wm_keymap_patch().
| 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().
|
static |
Definition at line 115 of file wm_keymap.cc.
References wmKeyMapItem::idname, PointerRNA::owner_id, wmKeyMapItem::properties, wmKeyMapItem::ptr, WM_operator_properties_alloc(), and WM_operator_properties_sanitize().
Referenced by WM_keyconfig_update_ex(), WM_keymap_add_item(), WM_keymap_item_properties_reset(), and wm_keymap_item_properties_update_ot().
|
static |
Similar to wm_keymap_item_properties_set but checks for the wmOperatorType having changed, see #38042.
Definition at line 128 of file wm_keymap.cc.
References BLI_assert, PointerRNA::data, wmKeyMapItem::idname, ot, PointerRNA::owner_id, wmKeyMapItem::properties, wmKeyMapItem::ptr, PointerRNA::type, wm_keymap_item_clear_runtime(), wm_keymap_item_free_data(), wm_keymap_item_properties_set(), WM_operator_properties_create_ptr(), WM_operator_properties_sanitize(), and WM_operatortype_find().
Referenced by wm_keymap_item_properties_update_ot_from_list().
|
static |
Definition at line 169 of file wm_keymap.cc.
References LISTBASE_FOREACH, and wm_keymap_item_properties_update_ot().
Referenced by WM_keyconfig_update_ex().
| std::optional< std::string > WM_keymap_item_raw_to_string | ( | const int8_t | shift, |
| const int8_t | ctrl, | ||
| const int8_t | alt, | ||
| const int8_t | oskey, | ||
| const int8_t | hyper, | ||
| const short | keymodifier, | ||
| const short | val, | ||
| const short | type, | ||
| const 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, |
| const 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().
|
static |
Definition at line 406 of file wm_keymap.cc.
References wmKeyMap::idname, MEM_callocN(), wmKeyMap::owner_id, wmKeyMap::regionid, RNA_struct_state_owner_get(), wmKeyMap::spaceid, STRNCPY(), and STRNCPY_UTF8.
Referenced by wm_keymap_diff_update(), and WM_keymap_ensure().
Maybe we should rather keep user-defined keymaps specific to a given base one?
Definition at line 682 of file wm_keymap.cc.
References BLI_addtail(), BLI_freelinkN(), BLI_insertlinkbefore(), wmKeyMap::diff_items, wmKeyMapItem::flag, wmKeyMapItem::id, wmKeyMap::items, keymap_item_set_id(), KMI_EXPANDED, KMI_USER_MODIFIED, LISTBASE_FOREACH, wm_keymap_find_item_equals(), wm_keymap_find_item_equals_result(), wm_keymap_item_copy(), and wm_keymap_item_free_data().
Referenced by wm_keymap_patch_update().
|
static |
Definition at line 745 of file wm_keymap.cc.
References BLI_addtail(), BLI_freelinkN(), wmKeyMap::flag, wmKeyMapItem::id, wmKeyMap::idname, wmKeyMap::items, KEYMAP_CHILDREN_EXPANDED, KEYMAP_DIFF, KEYMAP_EXPANDED, KEYMAP_UPDATE, KEYMAP_USER, KEYMAP_USER_MODIFIED, wmKeyMap::kmi_id, LISTBASE_FOREACH, wmKeyMap::regionid, wmKeyMap::spaceid, wm_keymap_addon_add(), WM_keymap_clear(), wm_keymap_copy(), wm_keymap_find_item_equals(), wm_keymap_find_item_equals_result(), WM_keymap_list_find(), and wm_keymap_patch().
Referenced by WM_keyconfig_update_ex().
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().
|
static |
Definition at line 1856 of file wm_keymap.cc.
References BLI_assert, wmKeyMap::idname, wmKeyConfig::keymaps, wmKeyMap::regionid, wmWindowManager::runtime, wmKeyMap::spaceid, WM_keyconfig_active(), and WM_keymap_list_find().
Referenced by WM_keyconfig_update_ex(), WM_keymap_item_find_match(), and WM_keymap_item_restore_to_default().
| 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().
|
static |
Definition at line 1843 of file wm_keymap.cc.
References wmKeyMap::flag, wmKeyMap::items, KEYMAP_UPDATE, KMI_UPDATE, LISTBASE_FOREACH, and update().
Referenced by WM_keyconfig_update_ex().
| 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, |
| const 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().
|
static |
Definition at line 1006 of file wm_keymap.cc.
References BLI_assert_msg, ListBase::first, wmKeyMap::flag, wmKeyMap::items, KEYMAP_MODAL, wmKeyMapItem::next, and wmKeyMapItem::propvalue.
Referenced by WM_modalkeymap_find_propvalue(), and WM_modalkeymap_items_to_string().
| std::optional< std::string > WM_modalkeymap_items_to_string | ( | const wmKeyMap * | km, |
| const int | propvalue, | ||
| const 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, |
| const int | propvalue, | ||
| const 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().
|
static |
Definition at line 1042 of file wm_keymap.cc.
References wmKeyMap::flag, wmKeyMap::idname, wmKeyMap::items, KEYMAP_MODAL, LISTBASE_FOREACH, wmKeyMap::modal_items, wmKeyMap::poll, wmKeyMap::poll_modal_item, RGN_TYPE_WINDOW, RNA_enum_value_from_id(), wmWindowManager::runtime, SPACE_EMPTY, and WM_keymap_list_find().
Referenced by WM_keyconfig_update_ex().
|
static |
Definition at line 1781 of file wm_keymap.cc.
Referenced by WM_keyconfig_update_ex(), WM_keyconfig_update_on_startup(), WM_keyconfig_update_operatortype_tag(), WM_keyconfig_update_postpone_begin(), WM_keyconfig_update_postpone_end(), WM_keyconfig_update_suppress_begin(), WM_keyconfig_update_suppress_end(), WM_keyconfig_update_tag(), and WM_keymap_item_find_match().
|
static |
Definition at line 1785 of file wm_keymap.cc.
Referenced by WM_keyconfig_update_suppress_begin(), and WM_keyconfig_update_suppress_end().
|
static |
Definition at line 1783 of file wm_keymap.cc.
Referenced by WM_keyconfig_update_suppress_begin(), and WM_keyconfig_update_suppress_end().