KeyMapItem(bpy_struct)
base class — bpy_struct
- class bpy.types.KeyMapItem(bpy_struct)
Item in a Key Map
- active
Activate or deactivate item (default False)
- Type:
bool
- alt
Alt key pressed, -1 for any state (in [-1, 1], default 0)
- Type:
int
- alt_ui
Alt key pressed (default False)
- Type:
bool
- any
Any modifier keys pressed (default False)
- Type:
bool
- ctrl
Control key pressed, -1 for any state (in [-1, 1], default 0)
- Type:
int
- ctrl_ui
Control key pressed (default False)
- Type:
bool
- direction
The direction (only applies to drag events) (default
'ANY')- Type:
Literal[Event Direction Items]
- hyper
Hyper key pressed, -1 for any state (in [-1, 1], default 0)
- Type:
int
- hyper_ui
Hyper key pressed. An additional modifier which can be configured on Linux, typically replacing CapsLock (default False)
- Type:
bool
- id
ID of the item (in [-32768, 32767], default 0, readonly)
- Type:
int
- idname
Identifier of operator to call on input event (default “”, never None)
- Type:
str
- is_user_defined
Is this keymap item user defined (does not just replace a builtin item) (default False, readonly)
- Type:
bool
- is_user_modified
Is this keymap item modified by the user (default False, readonly)
- Type:
bool
- key_modifier
Regular key pressed as a modifier (default
'NONE')- Type:
Literal[Event Type Items]
- map_type
Type of event mapping (default
'KEYBOARD')- Type:
Literal[‘KEYBOARD’, ‘MOUSE’, ‘NDOF’, ‘TEXTINPUT’, ‘TIMER’]
- name
Name of operator (translated) to call on input event (default “”, readonly, never None)
- Type:
str
- oskey
Operating system key pressed, -1 for any state (in [-1, 1], default 0)
- Type:
int
- oskey_ui
Operating system key pressed (default False)
- Type:
bool
- properties
Properties to set when the operator is called (readonly)
- Type:
- propvalue
The value this event translates to in a modal keymap (default
'NONE')- Type:
Literal[Keymap Propvalue Items]
- repeat
Active on key-repeat events (when a key is held) (default False)
- Type:
bool
- shift
Shift key pressed, -1 for any state (in [-1, 1], default 0)
- Type:
int
- shift_ui
Shift key pressed (default False)
- Type:
bool
- show_expanded
Show key map event and property details in the user interface (default False)
- Type:
bool
- type
Type of event (default
'NONE')- Type:
Literal[Event Type Items]
- value
(default
'NOTHING')- Type:
Literal[Event Value Items]
- compare(item)
compare
- Parameters:
item (
KeyMapItem) – Item- Returns:
Comparison result
- Return type:
bool
- to_string(*, compact=False)
to_string
- Parameters:
compact (bool) – Compact, (optional)
- Returns:
result, (never None)
- Return type:
str
- classmethod bl_rna_get_subclass(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
default (
bpy.types.Struct| None) – The value to return when not found.
- Returns:
The RNA type or default when not found.
- Return type: