KeyMapItems(bpy_struct)

base class — bpy_struct

class bpy.types.KeyMapItems(bpy_struct)

Collection of keymap items

new(idname, type, value, any=False, shift=0, ctrl=0, alt=0, oskey=0, key_modifier='NONE', direction='ANY', repeat=False, head=False)

new

Parameters:
  • idname (string, (never None)) – Operator Identifier

  • type (enum in Event Type Items) – Type

  • value (enum in Event Value Items) – Value

  • any (boolean, (optional)) – Any

  • shift (int in [-1, 1], (optional)) – Shift

  • ctrl (int in [-1, 1], (optional)) – Ctrl

  • alt (int in [-1, 1], (optional)) – Alt

  • oskey (int in [-1, 1], (optional)) – OS Key

  • key_modifier (enum in Event Type Items, (optional)) – Key Modifier

  • direction (enum in Event Direction Items, (optional)) – Direction

  • repeat (boolean, (optional)) – Repeat, When set, accept key-repeat events

  • head (boolean, (optional)) – At Head, Force item to be added at start (not end) of key map so that it doesn’t get blocked by an existing key map item

Returns:

Item, Added key map item

Return type:

KeyMapItem

new_modal(propvalue, type, value, any=False, shift=0, ctrl=0, alt=0, oskey=0, key_modifier='NONE', direction='ANY', repeat=False)

new_modal

Parameters:
  • propvalue (string, (never None)) – Property Value

  • type (enum in Event Type Items) – Type

  • value (enum in Event Value Items) – Value

  • any (boolean, (optional)) – Any

  • shift (int in [-1, 1], (optional)) – Shift

  • ctrl (int in [-1, 1], (optional)) – Ctrl

  • alt (int in [-1, 1], (optional)) – Alt

  • oskey (int in [-1, 1], (optional)) – OS Key

  • key_modifier (enum in Event Type Items, (optional)) – Key Modifier

  • direction (enum in Event Direction Items, (optional)) – Direction

  • repeat (boolean, (optional)) – Repeat, When set, accept key-repeat events

Returns:

Item, Added key map item

Return type:

KeyMapItem

new_from_item(item, head=False)

new_from_item

Parameters:
  • item (KeyMapItem, (never None)) – Item, Item to use as a reference

  • head (boolean, (optional)) – At Head

Returns:

Item, Added key map item

Return type:

KeyMapItem

remove(item)

remove

Parameters:

item (KeyMapItem, (never None)) – Item

from_id(id)

from_id

Parameters:

id (int in [-inf, inf]) – id, ID of the item

Returns:

Item

Return type:

KeyMapItem

find_from_operator(idname, properties=None, include={'ACTIONZONE', 'KEYBOARD', 'MOUSE', 'NDOF'}, exclude={})

find_from_operator

Parameters:
Return type:

KeyMapItem

match_event(event)

match_event

Return type:

KeyMapItem

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