Blender V4.3
wm_keymap.cc File Reference
#include <cstring>
#include <fmt/format.h>
#include "DNA_object_types.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_blenlib.h"
#include "BLI_string_utils.hh"
#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_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_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 wmKeyMapItemwm_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 wmKeyMapDiffItemwm_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.

wmKeyConfigWM_keyconfig_new (wmWindowManager *wm, const char *idname, bool user_defined)
 
wmKeyConfigWM_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 wmKeyConfigWM_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 wmKeyMapwm_keymap_new (const char *idname, int spaceid, int regionid)
 
static wmKeyMapwm_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 void keymap_event_set (wmKeyMapItem *kmi, const KeyMapItem_Params *params)
 
static void keymap_item_set_id (wmKeyMap *keymap, wmKeyMapItem *kmi)
 
wmKeyMapItemWM_keymap_add_item (wmKeyMap *keymap, const char *idname, const KeyMapItem_Params *params)
 
wmKeyMapItemWM_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 wmKeyMapItemwm_keymap_find_item_equals (wmKeyMap *km, wmKeyMapItem *needle)
 
static wmKeyMapItemwm_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 wmKeyMapwm_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.

wmKeyMapWM_keymap_list_find (ListBase *lb, const char *idname, int spaceid, int regionid)
 
wmKeyMapWM_keymap_list_find_spaceid_or_empty (ListBase *lb, const char *idname, int spaceid, int regionid)
 
wmKeyMapWM_keymap_ensure (wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
 
wmKeyMapWM_keymap_find_all (wmWindowManager *wm, const char *idname, int spaceid, int regionid)
 
wmKeyMapWM_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.

wmKeyMapWM_modalkeymap_ensure (wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
 
wmKeyMapWM_modalkeymap_find (wmKeyConfig *keyconf, const char *idname)
 
wmKeyMapItemWM_modalkeymap_add_item (wmKeyMap *km, const KeyMapItem_Params *params, int value)
 
wmKeyMapItemWM_modalkeymap_add_item_str (wmKeyMap *km, const KeyMapItem_Params *params, const char *value)
 
static const wmKeyMapItemwm_modalkeymap_find_propvalue_iter (const wmKeyMap *km, const wmKeyMapItem *kmi, const int propvalue)
 
const wmKeyMapItemWM_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 short shift, const short ctrl, const short alt, const short oskey, 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 wmKeyMapItemwm_keymap_item_find_in_keymap (wmKeyMap *keymap, const char *opname, IDProperty *properties, const bool is_strict, const wmKeyMapItemFind_Params *params)
 
static wmKeyMapItemwm_keymap_item_find_handlers (const bContext *C, wmWindowManager *wm, wmWindow *win, ListBase *handlers, const char *opname, wmOperatorCallContext, IDProperty *properties, const bool is_strict, const wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap)
 
static wmKeyMapItemwm_keymap_item_find_props (const bContext *C, const char *opname, wmOperatorCallContext opcontext, IDProperty *properties, const bool is_strict, const wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap)
 
static wmKeyMapItemwm_keymap_item_find (const bContext *C, const char *opname, wmOperatorCallContext 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, wmOperatorCallContext opcontext, IDProperty *properties, const bool is_strict)
 
static bool kmi_filter_is_visible_type_mask (const wmKeyMap *km, const wmKeyMapItem *kmi, void *user_data)
 
wmKeyMapItemWM_key_event_operator (const bContext *C, const char *opname, wmOperatorCallContext opcontext, IDProperty *properties, const short include_mask, const short exclude_mask, wmKeyMap **r_keymap)
 
wmKeyMapItemWM_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.

wmKeyMapWM_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)
 
wmKeyMapItemWM_keymap_item_find_id (wmKeyMap *keymap, int id)
 
const char * WM_bool_as_string (bool test)
 

Update Final Configuration

On load or other changes, the final user key configuration is rebuilt from the preset, add-on and user preferences keymaps. We also test if the final configuration changed and write the changes to the user preferences.

enum  { WM_KEYMAP_UPDATE_RECONFIGURE = (1 << 0) , WM_KEYMAP_UPDATE_OPERATORTYPE = (1 << 1) , WM_KEYMAP_UPDATE_POSTPONE = (1 << 2) }
 
static char wm_keymap_update_flag = 0
 
static char wm_keymap_update_suppress_flag = 0
 
static int8_t wm_keymap_update_suppress_count = 0
 
void WM_keyconfig_update_tag (wmKeyMap *keymap, wmKeyMapItem *kmi)
 
void WM_keyconfig_update_operatortype ()
 
void WM_keyconfig_update_suppress_begin ()
 
void WM_keyconfig_update_suppress_end ()
 
void WM_keyconfig_update_postpone_begin ()
 
void WM_keyconfig_update_postpone_end ()
 
static bool wm_keymap_test_and_clear_update (wmKeyMap *km)
 
static wmKeyMapwm_keymap_preset (wmWindowManager *wm, wmKeyMap *km)
 
void WM_keyconfig_update (wmWindowManager *wm)
 
void WM_keyconfig_update_ex (wmWindowManager *wm, bool keep_properties)
 

Detailed Description

Configurable key-maps - add/remove/find/compare/patch...

Definition in file wm_keymap.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WM_KEYMAP_UPDATE_RECONFIGURE 
WM_KEYMAP_UPDATE_OPERATORTYPE 
WM_KEYMAP_UPDATE_POSTPONE 

Definition at line 1758 of file wm_keymap.cc.

Function Documentation

◆ key_event_glyph_or_text()

static const char * key_event_glyph_or_text ( const int font_id,
const char * text,
const char * single_glyph )
static

◆ keymap_event_set()

◆ keymap_item_set_id()

◆ kmi_filter_is_visible()

static bool kmi_filter_is_visible ( const wmKeyMap * ,
const wmKeyMapItem * kmi,
void *  )
static

◆ kmi_filter_is_visible_type_mask()

static bool kmi_filter_is_visible_type_mask ( const wmKeyMap * km,
const wmKeyMapItem * kmi,
void * user_data )
static

◆ WM_bool_as_string()

const char * WM_bool_as_string ( bool test)

◆ WM_key_event_operator()

wmKeyMapItem * WM_key_event_operator ( const bContext * C,
const char * opname,
wmOperatorCallContext opcontext,
IDProperty * properties,
short include_mask,
short exclude_mask,
wmKeyMap ** r_keymap )
Parameters
include_mask,exclude_maskEvent types to include/exclude when looking up keys (eEventType_Mask).

Definition at line 1663 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().

Referenced by menu_change_shortcut(), remove_shortcut_func(), and ui_popup_context_menu_for_button().

◆ WM_key_event_operator_from_keymap()

wmKeyMapItem * WM_key_event_operator_from_keymap ( wmKeyMap * keymap,
const char * opname,
IDProperty * properties,
const short include_mask,
const short exclude_mask )

◆ WM_key_event_operator_string()

◆ WM_key_event_string()

◆ WM_keyconfig_active()

static wmKeyConfig * WM_keyconfig_active ( wmWindowManager * wm)
static

◆ WM_keyconfig_clear()

void WM_keyconfig_clear ( wmKeyConfig * keyconf)

◆ WM_keyconfig_ensure()

◆ WM_keyconfig_free()

void WM_keyconfig_free ( wmKeyConfig * keyconf)

Definition at line 360 of file wm_keymap.cc.

References MEM_freeN(), and WM_keyconfig_clear().

Referenced by wm_close_and_free(), and WM_keyconfig_remove().

◆ WM_keyconfig_new()

wmKeyConfig * WM_keyconfig_new ( wmWindowManager * wm,
const char * idname,
bool user_defined )

◆ WM_keyconfig_remove()

◆ WM_keyconfig_set_active()

void WM_keyconfig_set_active ( wmWindowManager * wm,
const char * idname )

◆ WM_keyconfig_update()

◆ WM_keyconfig_update_ex()

◆ WM_keyconfig_update_operatortype()

void WM_keyconfig_update_operatortype ( )

Definition at line 1787 of file wm_keymap.cc.

References wm_keymap_update_flag, and WM_KEYMAP_UPDATE_OPERATORTYPE.

Referenced by WM_operatortype_remove_ptr().

◆ WM_keyconfig_update_postpone_begin()

void WM_keyconfig_update_postpone_begin ( )

Definition at line 1819 of file wm_keymap.cc.

References wm_keymap_update_flag, and WM_KEYMAP_UPDATE_POSTPONE.

Referenced by WM_init().

◆ WM_keyconfig_update_postpone_end()

void WM_keyconfig_update_postpone_end ( )

Definition at line 1824 of file wm_keymap.cc.

References wm_keymap_update_flag.

Referenced by WM_init().

◆ WM_keyconfig_update_suppress_begin()

◆ WM_keyconfig_update_suppress_end()

◆ WM_keyconfig_update_tag()

◆ WM_keymap_active()

◆ WM_keymap_add_item()

◆ WM_keymap_add_item_copy()

wmKeyMapItem * WM_keymap_add_item_copy ( wmKeyMap * keymap,
wmKeyMapItem * kmi_src )

◆ wm_keymap_addon_add()

static void wm_keymap_addon_add ( wmKeyMap * keymap,
wmKeyMap * addonmap )
static

◆ WM_keymap_clear()

◆ wm_keymap_copy()

◆ wm_keymap_diff()

◆ wm_keymap_diff_item_copy()

◆ wm_keymap_diff_item_free()

static void wm_keymap_diff_item_free ( wmKeyMapDiffItem * kmdi)
static

◆ wm_keymap_diff_update()

◆ WM_keymap_ensure()

wmKeyMap * WM_keymap_ensure ( wmKeyConfig * keyconf,
const char * idname,
int spaceid,
int regionid )

Definition at line 897 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(), nla_buttons_region_init(), nla_keymap(), nla_main_region_init(), nla_track_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(), sequencer_buttons_region_init(), sequencer_channel_region_init(), sequencer_keymap(), sequencer_main_region_init(), sequencer_preview_region_init(), 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_click_drag_with_keyconfig(), WM_gizmo_keymap_generic_drag_with_keyconfig(), WM_gizmo_keymap_generic_maybe_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().

◆ WM_keymap_find_all()

wmKeyMap * WM_keymap_find_all ( wmWindowManager * wm,
const char * idname,
int spaceid,
int regionid )

◆ WM_keymap_find_all_spaceid_or_empty()

wmKeyMap * WM_keymap_find_all_spaceid_or_empty ( wmWindowManager * wm,
const char * idname,
int spaceid,
int regionid )

◆ wm_keymap_find_item_equals()

static wmKeyMapItem * wm_keymap_find_item_equals ( wmKeyMap * km,
wmKeyMapItem * needle )
static

◆ wm_keymap_find_item_equals_result()

static wmKeyMapItem * wm_keymap_find_item_equals_result ( wmKeyMap * km,
wmKeyMapItem * needle )
static

◆ wm_keymap_item_clear_runtime()

static void wm_keymap_item_clear_runtime ( wmKeyMapItem * kmi)
static

◆ WM_keymap_item_compare()

◆ wm_keymap_item_copy()

◆ wm_keymap_item_equals()

static bool wm_keymap_item_equals ( wmKeyMapItem * a,
wmKeyMapItem * b )
static

◆ wm_keymap_item_equals_result()

static bool wm_keymap_item_equals_result ( wmKeyMapItem * a,
wmKeyMapItem * b )
static

◆ wm_keymap_item_find()

◆ wm_keymap_item_find_handlers()

static wmKeyMapItem * wm_keymap_item_find_handlers ( const bContext * C,
wmWindowManager * wm,
wmWindow * win,
ListBase * handlers,
const char * opname,
wmOperatorCallContext ,
IDProperty * properties,
const bool is_strict,
const wmKeyMapItemFind_Params * params,
wmKeyMap ** r_keymap )
static

◆ WM_keymap_item_find_id()

wmKeyMapItem * WM_keymap_item_find_id ( wmKeyMap * keymap,
int id )

◆ wm_keymap_item_find_in_keymap()

◆ wm_keymap_item_find_props()

◆ wm_keymap_item_free_data()

◆ WM_keymap_item_map_type_get()

◆ WM_keymap_item_properties_reset()

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 204 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 menu_add_shortcut(), and WM_keymap_item_restore_to_default().

◆ wm_keymap_item_properties_set()

◆ wm_keymap_item_properties_update_ot()

◆ wm_keymap_item_properties_update_ot_from_list()

static void wm_keymap_item_properties_update_ot_from_list ( ListBase * km_lb,
const bool keep_properties )
static

Definition at line 167 of file wm_keymap.cc.

References LISTBASE_FOREACH, and wm_keymap_item_properties_update_ot().

Referenced by WM_keyconfig_update_ex().

◆ WM_keymap_item_raw_to_string()

std::optional< std::string > WM_keymap_item_raw_to_string ( const short shift,
const short ctrl,
const short alt,
const short oskey,
const short keymodifier,
const short val,
const short type,
const bool compact )

◆ WM_keymap_item_restore_to_default()

◆ WM_keymap_item_to_string()

◆ WM_keymap_list_find()

◆ WM_keymap_list_find_spaceid_or_empty()

wmKeyMap * WM_keymap_list_find_spaceid_or_empty ( ListBase * lb,
const char * idname,
int spaceid,
int regionid )

◆ wm_keymap_new()

static wmKeyMap * wm_keymap_new ( const char * idname,
int spaceid,
int regionid )
static

◆ wm_keymap_patch()

static void wm_keymap_patch ( wmKeyMap * km,
wmKeyMap * diff_km )
static
Note
This typically happens when we apply user-defined keymap diff to a base one that was exported with that customized keymap already. In that case:
  • wm_keymap_find_item_equals(km, kmdi->remove_item) finds nothing (because actual shortcut of current base does not match kmdi->remove_item any more).
  • wm_keymap_find_item_equals_result(km, kmdi->remove_item) finds the current kmi from base keymap (because it does exactly the same thing).
  • wm_keymap_find_item_equals(km, kmdi->add_item) finds the same kmi, since base keymap was exported with that user-defined shortcut already!
    Maybe we should rather keep user-defined keymaps specific to a given base one? 
    

Definition at line 684 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().

◆ wm_keymap_patch_update()

◆ WM_keymap_poll()

◆ wm_keymap_preset()

◆ WM_keymap_remove()

void WM_keymap_remove ( wmKeyConfig * keyconf,
wmKeyMap * keymap )

◆ WM_keymap_remove_item()

◆ WM_keymap_restore_to_default()

◆ wm_keymap_test_and_clear_update()

static bool wm_keymap_test_and_clear_update ( wmKeyMap * km)
static

◆ WM_modalkeymap_add_item()

◆ WM_modalkeymap_add_item_str()

wmKeyMapItem * WM_modalkeymap_add_item_str ( wmKeyMap * km,
const KeyMapItem_Params * params,
const char * value )

◆ WM_modalkeymap_assign()

◆ WM_modalkeymap_ensure()

◆ WM_modalkeymap_find()

◆ WM_modalkeymap_find_propvalue()

const wmKeyMapItem * WM_modalkeymap_find_propvalue ( const wmKeyMap * km,
const int propvalue )

◆ wm_modalkeymap_find_propvalue_iter()

static const wmKeyMapItem * wm_modalkeymap_find_propvalue_iter ( const wmKeyMap * km,
const wmKeyMapItem * kmi,
const int propvalue )
static

◆ WM_modalkeymap_items_to_string()

std::optional< std::string > WM_modalkeymap_items_to_string ( const wmKeyMap * km,
const int propvalue,
const bool compact )

◆ WM_modalkeymap_operator_items_to_string()

std::optional< std::string > WM_modalkeymap_operator_items_to_string ( wmOperatorType * ot,
const int propvalue,
const bool compact )

◆ wm_user_modal_keymap_set_items()

Variable Documentation

◆ wm_keymap_update_flag

◆ wm_keymap_update_suppress_count

int8_t wm_keymap_update_suppress_count = 0
static

◆ wm_keymap_update_suppress_flag

char wm_keymap_update_suppress_flag = 0
static