IInput#

class carb.input.IInput#

Bases: pybind11_object

Primary interface for input devices and action mappings.

Methods

__init__(*args, **kwargs)

add_action_mapping(*args, **kwargs)

Overloaded function.

clear_action_mappings(self, arg0, arg1)

Clears all mappings for an action.

create_action_mapping_set(self, arg0)

Creates a new action mapping set.

destroy_action_mapping_set(self, arg0)

Destroys an action mapping set.

distribute_buffered_events(self)

filter_buffered_events(self, arg0)

Filters buffered input events with a callback.

get_action_button_flags(*args, **kwargs)

Overloaded function.

get_action_count(self, arg0)

get_action_mapping_count(self, arg0, arg1)

Returns the number of mappings for an action.

get_action_mapping_set_by_path(*args, **kwargs)

Overloaded function.

get_action_mappings(self, arg0, arg1)

Returns the list of mappings for an action.

get_action_value(*args, **kwargs)

Overloaded function.

get_actions(self, arg0)

Returns the list of action names in an action mapping set.

get_device_name(self, arg0)

get_device_type(self, arg0)

get_gamepad_button_flags(self, arg0, arg1)

get_gamepad_guid(self, arg0)

get_gamepad_name(self, arg0)

get_gamepad_value(self, arg0, arg1)

get_global_modifier_flags(self[, modifiers, ...])

Gets current global modifier flags; considers mouse button state if provided.

get_input_provider(self)

Gets the input provider interface.

get_keyboard_button_flags(self, arg0, arg1)

get_keyboard_name(self, arg0)

get_keyboard_value(self, arg0, arg1)

get_modifier_flags(self[, modifiers, ...])

Gets current modifier flags considering specified devices/buttons.

get_mouse_button_flags(self, arg0, arg1)

get_mouse_coords_normalized(self, arg0)

get_mouse_coords_pixel(self, arg0)

get_mouse_name(self, arg0)

get_mouse_value(self, arg0, arg1)

remove_action_mapping(self, arg0, arg1, arg2)

Removes a specific action mapping by index.

set_action_mapping(*args, **kwargs)

Overloaded function.

set_default_action_mapping(*args, **kwargs)

Overloaded function.

shutdown(self)

Shuts down the input system.

startup(self)

Initializes the input system.

subscribe_to_action_events(*args, **kwargs)

Overloaded function.

subscribe_to_gamepad_connection_events(self, ...)

Subscribes to gamepad connection/disconnection events.

subscribe_to_gamepad_events(self, arg0, arg1)

Subscribes to gamepad events for the specified gamepad.

subscribe_to_input_events(self, eventFn[, ...])

Subscribes to all input events, optionally filtered by device/types.

subscribe_to_keyboard_events(self, arg0, arg1)

Subscribes to keyboard events for the specified keyboard.

subscribe_to_mouse_events(self, arg0, arg1)

Subscribes to mouse events for the specified mouse.

unsubscribe_to_action_events(*args, **kwargs)

Overloaded function.

unsubscribe_to_gamepad_connection_events(...)

Unsubscribes from gamepad connection/disconnection events.

unsubscribe_to_gamepad_events(self, arg0, arg1)

Unsubscribes from gamepad events.

unsubscribe_to_input_events(self, arg0)

Unsubscribes from input events.

unsubscribe_to_keyboard_events(self, arg0, arg1)

Unsubscribes from keyboard events.

unsubscribe_to_mouse_events(self, arg0, arg1)

Unsubscribes from mouse events.

__init__(*args, **kwargs)#
add_action_mapping(*args, **kwargs)#

Overloaded function.

  1. add_action_mapping(self: carb.input.IInput, action_mapping_set: carb.input.ActionMappingSet, action: str, keyboard: carb.input.Keyboard, keyboard_input: carb.input.KeyboardInput, modifiers: int = 0) -> int

Adds a keyboard mapping for an action.

  1. add_action_mapping(self: carb.input.IInput, action_mapping_set: carb.input.ActionMappingSet, action: str, mouse: carb.input.Mouse, mouse_input: carb.input.MouseInput, modifiers: int = 0) -> int

Adds a mouse mapping for an action.

  1. add_action_mapping(self: carb.input.IInput, action_mapping_set: carb.input.ActionMappingSet, action: str, gamepad: carb.input.Gamepad, gamepad_input: carb.input.GamepadInput) -> int

Adds a gamepad mapping for an action.

clear_action_mappings(
self: carb.input.IInput,
arg0: carb.input.ActionMappingSet,
arg1: str,
) None#

Clears all mappings for an action.

create_action_mapping_set(
self: carb.input.IInput,
arg0: str,
) carb.input.ActionMappingSet#

Creates a new action mapping set.

destroy_action_mapping_set(
self: carb.input.IInput,
arg0: carb.input.ActionMappingSet,
) None#

Destroys an action mapping set.

distribute_buffered_events(self: carb.input.IInput) None#
filter_buffered_events(
self: carb.input.IInput,
arg0: Callable[[carb.input.InputEvent], carb.input.FilterResult],
) None#

Filters buffered input events with a callback.

get_action_button_flags(*args, **kwargs)#

Overloaded function.

  1. get_action_button_flags(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) -> int

Gets button flags for an action.

  1. get_action_button_flags(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) -> int

get_action_count(
self: carb.input.IInput,
arg0: carb.input.ActionMappingSet,
) int#
get_action_mapping_count(
self: carb.input.IInput,
arg0: carb.input.ActionMappingSet,
arg1: str,
) int#

Returns the number of mappings for an action.

get_action_mapping_set_by_path(*args, **kwargs)#

Overloaded function.

  1. get_action_mapping_set_by_path(self: carb.input.IInput, arg0: str) -> carb.input.ActionMappingSet

Retrieves an existing action mapping set by path.

  1. get_action_mapping_set_by_path(self: carb.input.IInput, arg0: str) -> carb.input.ActionMappingSet

get_action_mappings(
self: carb.input.IInput,
arg0: carb.input.ActionMappingSet,
arg1: str,
) List[carb.input.ActionMappingDesc]#

Returns the list of mappings for an action.

get_action_value(*args, **kwargs)#

Overloaded function.

  1. get_action_value(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) -> float

Gets the current value for an action.

  1. get_action_value(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) -> float

get_actions(
self: carb.input.IInput,
arg0: carb.input.ActionMappingSet,
) List[str]#

Returns the list of action names in an action mapping set.

get_device_name(
self: carb.input.IInput,
arg0: carb.input.InputDevice,
) str#
get_device_type(
self: carb.input.IInput,
arg0: carb.input.InputDevice,
) carb.input.DeviceType#
get_gamepad_button_flags(
self: carb.input.IInput,
arg0: carb.input.Gamepad,
arg1: carb.input.GamepadInput,
) int#
get_gamepad_guid(
self: carb.input.IInput,
arg0: carb.input.Gamepad,
) str#
get_gamepad_name(
self: carb.input.IInput,
arg0: carb.input.Gamepad,
) str#
get_gamepad_value(
self: carb.input.IInput,
arg0: carb.input.Gamepad,
arg1: carb.input.GamepadInput,
) float#
get_global_modifier_flags(
self: carb.input.IInput,
modifiers: int = 0,
mouse_buttons: object = None,
) int#

Gets current global modifier flags; considers mouse button state if provided.

get_input_provider(
self: carb.input.IInput,
) carb::input::InputProvider#

Gets the input provider interface.

get_keyboard_button_flags(
self: carb.input.IInput,
arg0: carb.input.Keyboard,
arg1: carb.input.KeyboardInput,
) int#
get_keyboard_name(
self: carb.input.IInput,
arg0: carb.input.Keyboard,
) str#
get_keyboard_value(
self: carb.input.IInput,
arg0: carb.input.Keyboard,
arg1: carb.input.KeyboardInput,
) float#
get_modifier_flags(
self: carb.input.IInput,
modifiers: int = 0,
input_devices: List[carb.input.InputDevice] = [],
device_types: List[carb.input.DeviceType] = [],
mouse_buttons: object = None,
) int#

Gets current modifier flags considering specified devices/buttons.

get_mouse_button_flags(
self: carb.input.IInput,
arg0: carb.input.Mouse,
arg1: carb.input.MouseInput,
) int#
get_mouse_coords_normalized(
self: carb.input.IInput,
arg0: carb.input.Mouse,
) carb._carb.Float2#
get_mouse_coords_pixel(
self: carb.input.IInput,
arg0: carb.input.Mouse,
) carb._carb.Float2#
get_mouse_name(
self: carb.input.IInput,
arg0: carb.input.Mouse,
) str#
get_mouse_value(
self: carb.input.IInput,
arg0: carb.input.Mouse,
arg1: carb.input.MouseInput,
) float#
remove_action_mapping(
self: carb.input.IInput,
arg0: carb.input.ActionMappingSet,
arg1: str,
arg2: int,
) None#

Removes a specific action mapping by index.

set_action_mapping(*args, **kwargs)#

Overloaded function.

  1. set_action_mapping(self: carb.input.IInput, action_mapping_set: carb.input.ActionMappingSet, action: str, index: int, keyboard: carb.input.Keyboard, keyboard_input: carb.input.KeyboardInput, modifiers: int = 0) -> None

Replaces an action mapping at an index with a keyboard mapping.

  1. set_action_mapping(self: carb.input.IInput, action_mapping_set: carb.input.ActionMappingSet, action: str, index: int, mouse: carb.input.Mouse, mouse_input: carb.input.MouseInput, modifiers: int = 0) -> None

Replaces an action mapping at an index with a mouse mapping.

  1. set_action_mapping(self: carb.input.IInput, action_mapping_set: carb.input.ActionMappingSet, action: str, index: int, gamepad: carb.input.Gamepad, gamepad_input: carb.input.GamepadInput) -> None

Replaces an action mapping at an index with a gamepad mapping.

set_default_action_mapping(*args, **kwargs)#

Overloaded function.

  1. set_default_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Keyboard, arg3: carb.input.KeyboardInput, arg4: int) -> bool

  2. set_default_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Gamepad, arg3: carb.input.GamepadInput) -> bool

  3. set_default_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Mouse, arg3: carb.input.MouseInput, arg4: int) -> bool

shutdown(self: carb.input.IInput) None#

Shuts down the input system.

startup(self: carb.input.IInput) None#

Initializes the input system.

subscribe_to_action_events(*args, **kwargs)#

Overloaded function.

  1. subscribe_to_action_events(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: Callable[[carb.input.ActionEvent], bool]) -> int

Subscribes to action events for a given action.

  1. subscribe_to_action_events(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: Callable[[carb.input.ActionEvent], bool]) -> int

subscribe_to_gamepad_connection_events(
self: carb.input.IInput,
arg0: Callable[[carb.input.GamepadConnectionEvent], None],
) int#

Subscribes to gamepad connection/disconnection events.

subscribe_to_gamepad_events(
self: carb.input.IInput,
arg0: carb.input.Gamepad,
arg1: Callable[[carb.input.GamepadEvent], bool],
) int#

Subscribes to gamepad events for the specified gamepad.

subscribe_to_input_events(
self: carb.input.IInput,
eventFn: Callable[[carb.input.InputEvent], bool],
eventTypes: int = 4294967295,
device: carb.input.InputDevice = None,
order: int = -1,
) int#

Subscribes to all input events, optionally filtered by device/types.

subscribe_to_keyboard_events(
self: carb.input.IInput,
arg0: carb.input.Keyboard,
arg1: Callable[[carb.input.KeyboardEvent], bool],
) int#

Subscribes to keyboard events for the specified keyboard.

subscribe_to_mouse_events(
self: carb.input.IInput,
arg0: carb.input.Mouse,
arg1: Callable[[carb.input.MouseEvent], bool],
) int#

Subscribes to mouse events for the specified mouse.

unsubscribe_to_action_events(*args, **kwargs)#

Overloaded function.

  1. unsubscribe_to_action_events(self: carb.input.IInput, arg0: int) -> None

Unsubscribes from action events.

  1. unsubscribe_to_action_events(self: carb.input.IInput, arg0: int) -> None

unsubscribe_to_gamepad_connection_events(
self: carb.input.IInput,
arg0: int,
) None#

Unsubscribes from gamepad connection/disconnection events.

unsubscribe_to_gamepad_events(
self: carb.input.IInput,
arg0: carb.input.Gamepad,
arg1: int,
) None#

Unsubscribes from gamepad events.

unsubscribe_to_input_events(
self: carb.input.IInput,
arg0: int,
) None#

Unsubscribes from input events.

unsubscribe_to_keyboard_events(
self: carb.input.IInput,
arg0: carb.input.Keyboard,
arg1: int,
) None#

Unsubscribes from keyboard events.

unsubscribe_to_mouse_events(
self: carb.input.IInput,
arg0: carb.input.Mouse,
arg1: int,
) None#

Unsubscribes from mouse events.