IInput#
- class carb.input.IInput#
Bases:
pybind11_objectPrimary 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.
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.
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.
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.
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.
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,
Clears all mappings for an action.
- create_action_mapping_set(
- self: carb.input.IInput,
- arg0: str,
Creates a new action mapping set.
- destroy_action_mapping_set(
- self: carb.input.IInput,
- arg0: carb.input.ActionMappingSet,
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],
Filters buffered input events with a callback.
- get_action_button_flags(*args, **kwargs)#
Overloaded function.
get_action_button_flags(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) -> int
Gets button flags for an action.
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,
- get_action_mapping_count(
- self: carb.input.IInput,
- arg0: carb.input.ActionMappingSet,
- arg1: str,
Returns the number of mappings for an action.
- get_action_mapping_set_by_path(*args, **kwargs)#
Overloaded function.
get_action_mapping_set_by_path(self: carb.input.IInput, arg0: str) -> carb.input.ActionMappingSet
Retrieves an existing action mapping set by path.
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,
Returns the list of mappings for an action.
- get_action_value(*args, **kwargs)#
Overloaded function.
get_action_value(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) -> float
Gets the current value for an action.
get_action_value(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) -> float
- get_actions(
- self: carb.input.IInput,
- arg0: carb.input.ActionMappingSet,
Returns the list of action names in an action mapping set.
- get_device_name(
- self: carb.input.IInput,
- arg0: carb.input.InputDevice,
- get_device_type(
- self: carb.input.IInput,
- arg0: carb.input.InputDevice,
- get_gamepad_button_flags(
- self: carb.input.IInput,
- arg0: carb.input.Gamepad,
- arg1: carb.input.GamepadInput,
- get_gamepad_guid(
- self: carb.input.IInput,
- arg0: carb.input.Gamepad,
- get_gamepad_name(
- self: carb.input.IInput,
- arg0: carb.input.Gamepad,
- get_gamepad_value(
- self: carb.input.IInput,
- arg0: carb.input.Gamepad,
- arg1: carb.input.GamepadInput,
- get_global_modifier_flags(
- self: carb.input.IInput,
- modifiers: int = 0,
- mouse_buttons: object = None,
Gets current global modifier flags; considers mouse button state if provided.
- get_input_provider(
- self: carb.input.IInput,
Gets the input provider interface.
- get_keyboard_button_flags(
- self: carb.input.IInput,
- arg0: carb.input.Keyboard,
- arg1: carb.input.KeyboardInput,
- get_keyboard_name(
- self: carb.input.IInput,
- arg0: carb.input.Keyboard,
- get_keyboard_value(
- self: carb.input.IInput,
- arg0: carb.input.Keyboard,
- arg1: carb.input.KeyboardInput,
- 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,
Gets current modifier flags considering specified devices/buttons.
- get_mouse_button_flags(
- self: carb.input.IInput,
- arg0: carb.input.Mouse,
- arg1: carb.input.MouseInput,
- get_mouse_coords_normalized(
- self: carb.input.IInput,
- arg0: carb.input.Mouse,
- get_mouse_coords_pixel(
- self: carb.input.IInput,
- arg0: carb.input.Mouse,
- get_mouse_name(
- self: carb.input.IInput,
- arg0: carb.input.Mouse,
- get_mouse_value(
- self: carb.input.IInput,
- arg0: carb.input.Mouse,
- arg1: carb.input.MouseInput,
- remove_action_mapping(
- self: carb.input.IInput,
- arg0: carb.input.ActionMappingSet,
- arg1: str,
- arg2: int,
Removes a specific action mapping by index.
- set_action_mapping(*args, **kwargs)#
Overloaded function.
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.
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.
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.
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
set_default_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Gamepad, arg3: carb.input.GamepadInput) -> bool
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.
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.
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],
Subscribes to gamepad connection/disconnection events.
- subscribe_to_gamepad_events(
- self: carb.input.IInput,
- arg0: carb.input.Gamepad,
- arg1: Callable[[carb.input.GamepadEvent], bool],
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,
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],
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],
Subscribes to mouse events for the specified mouse.
- unsubscribe_to_action_events(*args, **kwargs)#
Overloaded function.
unsubscribe_to_action_events(self: carb.input.IInput, arg0: int) -> None
Unsubscribes from action events.
unsubscribe_to_action_events(self: carb.input.IInput, arg0: int) -> None
- unsubscribe_to_gamepad_connection_events(
- self: carb.input.IInput,
- arg0: int,
Unsubscribes from gamepad connection/disconnection events.
- unsubscribe_to_gamepad_events(
- self: carb.input.IInput,
- arg0: carb.input.Gamepad,
- arg1: int,
Unsubscribes from gamepad events.
- unsubscribe_to_input_events(
- self: carb.input.IInput,
- arg0: int,
Unsubscribes from input events.
- unsubscribe_to_keyboard_events(
- self: carb.input.IInput,
- arg0: carb.input.Keyboard,
- arg1: int,
Unsubscribes from keyboard events.
- unsubscribe_to_mouse_events(
- self: carb.input.IInput,
- arg0: carb.input.Mouse,
- arg1: int,
Unsubscribes from mouse events.