Event(bpy_struct)

base class — bpy_struct

class bpy.types.Event(bpy_struct)

Window Manager Event

alt

True when the Alt/Option key is held (default False, readonly)

Type:

bool

ascii

Single ASCII character for this event (default “”, readonly, never None)

Type:

str

ctrl

True when the Ctrl key is held (default False, readonly)

Type:

bool

direction

The direction (only applies to drag events) (default 'ANY', readonly)

Type:

Literal[Event Direction Items]

hyper

True when the Hyper key is held (default False, readonly)

Type:

bool

is_consecutive

Part of a trackpad or NDOF motion, interrupted by cursor motion, button or key press events (default False, readonly)

Type:

bool

is_mouse_absolute

The last motion event was an absolute input (default False, readonly)

Type:

bool

is_repeat

The event is generated by holding a key down (default False, readonly)

Type:

bool

is_tablet

The event has tablet data (default False, readonly)

Type:

bool

mouse_prev_press_x

The window relative horizontal location of the last press event (in [-inf, inf], default 0, readonly)

Type:

int

mouse_prev_press_y

The window relative vertical location of the last press event (in [-inf, inf], default 0, readonly)

Type:

int

mouse_prev_x

The window relative horizontal location of the mouse (in [-inf, inf], default 0, readonly)

Type:

int

mouse_prev_y

The window relative vertical location of the mouse (in [-inf, inf], default 0, readonly)

Type:

int

mouse_region_x

The region relative horizontal location of the mouse (in [-inf, inf], default 0, readonly)

Type:

int

mouse_region_y

The region relative vertical location of the mouse (in [-inf, inf], default 0, readonly)

Type:

int

mouse_x

The window relative horizontal location of the mouse (in [-inf, inf], default 0, readonly)

Type:

int

mouse_y

The window relative vertical location of the mouse (in [-inf, inf], default 0, readonly)

Type:

int

ndof_motion

NDOF motion event data (readonly)

Type:

NDOFMotionEventData

oskey

True when the Cmd key is held (default False, readonly)

Type:

bool

pressure

The pressure of the tablet or 1.0 if no tablet present (in [0, 1], default 1.0, readonly)

Type:

float

shift

True when the Shift key is held (default False, readonly)

Type:

bool

tilt

The pressure of the tablet or zeroes if no tablet present (array of 2 items, in [-inf, inf], default (0.0, 0.0), readonly)

Type:

mathutils.Vector

type

(default 'NONE', readonly)

Type:

Literal[Event Type Items]

type_prev

(default 'NONE', readonly)

Type:

Literal[Event Type Items]

unicode

Single unicode character for this event (default “”, readonly, never None)

Type:

str

value

The type of event, only applies to some (default 'NOTHING', readonly)

Type:

Literal[Event Value Items]

value_prev

The type of event, only applies to some (default 'NOTHING', readonly)

Type:

Literal[Event Value Items]

xr

XR event data (readonly)

Type:

XrEventData

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:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References