KeyMapItem(bpy_struct)

base class — bpy_struct

class bpy.types.KeyMapItem(bpy_struct)

Item in a Key Map

active

Activate or deactivate item

Type

boolean, default False

alt

Alt key pressed, -1 for any state

Type

int in [-1, 1], default 0

alt_ui

Alt key pressed

Type

boolean, default False

any

Any modifier keys pressed

Type

boolean, default False

ctrl

Control key pressed, -1 for any state

Type

int in [-1, 1], default 0

ctrl_ui

Control key pressed

Type

boolean, default False

direction

The direction (only applies to drag events)

Type

enum in Event Direction Items, default ‘ANY’

id

ID of the item

Type

int in [-32768, 32767], default 0, (readonly)

idname

Identifier of operator to call on input event

Type

string, default “”, (never None)

is_user_defined

Is this keymap item user defined (doesn’t just replace a builtin item)

Type

boolean, default False, (readonly)

is_user_modified

Is this keymap item modified by the user

Type

boolean, default False, (readonly)

key_modifier

Regular key pressed as a modifier

Type

enum in Event Type Items, default ‘NONE’

map_type

Type of event mapping

Type

enum in [‘KEYBOARD’, ‘MOUSE’, ‘NDOF’, ‘TEXTINPUT’, ‘TIMER’], default ‘KEYBOARD’

name

Name of operator (translated) to call on input event

Type

string, default “”, (readonly, never None)

oskey

Operating system key pressed, -1 for any state

Type

int in [-1, 1], default 0

oskey_ui

Operating system key pressed

Type

boolean, default False

properties

Properties to set when the operator is called

Type

OperatorProperties, (readonly)

propvalue

The value this event translates to in a modal keymap

Type

enum in Keymap Propvalue Items, default ‘NONE’

repeat

Active on key-repeat events (when a key is held)

Type

boolean, default False

shift

Shift key pressed, -1 for any state

Type

int in [-1, 1], default 0

shift_ui

Shift key pressed

Type

boolean, default False

show_expanded

Show key map event and property details in the user interface

Type

boolean, default False

type

Type of event

Type

enum in Event Type Items, default ‘NONE’

value
Type

enum in Event Value Items, default ‘NOTHING’

compare(item)

compare

Parameters

item (KeyMapItem) – Item

Returns

Comparison result

Return type

boolean

to_string(compact=False)

to_string

Parameters

compact (boolean, (optional)) – Compact

Returns

result

Return type

string, (never None)

classmethod bl_rna_get_subclass(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The RNA type or default when not found.

Return type

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The class or default when not found.

Return type

type

Inherited Properties

Inherited Functions

References