KeyMaps(bpy_struct)#

base class — bpy_struct

class bpy.types.KeyMaps(bpy_struct)#

Collection of keymaps

new(name, space_type='EMPTY', region_type='WINDOW', modal=False, tool=False)#

Ensure the keymap exists. This will return the one with the given name/space type/region type, or create a new one if it does not exist yet.

Parameters:
  • name (string, (never None)) – Name

  • space_type (enum in Space Type Items, (optional)) – Space Type

  • region_type (enum in Region Type Items, (optional)) – Region Type

  • modal (boolean, (optional)) – Modal, Keymap for modal operators

  • tool (boolean, (optional)) – Tool, Keymap for active tools

Returns:

Key Map, Added key map

Return type:

KeyMap

remove(keymap)#

remove

Parameters:

keymap (KeyMap, (never None)) – Key Map, Removed key map

clear()#

Remove all keymaps.

find(name, space_type='EMPTY', region_type='WINDOW')#

find

Parameters:
  • name (string, (never None)) – Name

  • space_type (enum in Space Type Items, (optional)) – Space Type

  • region_type (enum in Region Type Items, (optional)) – Region Type

Returns:

Key Map, Corresponding key map

Return type:

KeyMap

find_modal(name)#

find_modal

Parameters:

name (string, (never None)) – Operator Name

Returns:

Key Map, Corresponding key map

Return type:

KeyMap

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