class InputSource
Methods 58
Change game focus number
add- number to add to focus number
input_device- if equals -1, works globally on all devices, see INPUT_DEVICE_* values in constants.h
See also: HasGameFocus()
Show 11 more
, PluginDayZInfectedDebug.ReleaseFocus(), PluginDayzPlayerDebug.CaptureFocus(), PluginDayzPlayerDebug.ReleaseFocus(), PluginDeveloper.SetDeveloperItemClientEx(), PluginDeveloperSync.CaptureFocus(), PluginDeveloperSync.ReleaseFocus(), PluginDeveloperSync.ToggleFocus(), PluginSceneManager.FreeCameraControlDisable(), PluginSceneManager.FreeCameraControlEnable(), UIScriptedMenu.LockControls(), and UIScriptedMenu.UnlockControls()proto native void ResetGameFocus(int input_device = -1)Reset game focus number (set to 0)
input_device- if equals -1, works globally on all devices, see INPUT_DEVICE_* values in constants.h
See also: HasGameFocus()
Check if game should have focus
input_device- if equals -1, checks all devices, see INPUT_DEVICE_* values in constants.h
Returns: true if focus number == 0, false otherwise
proto native int GetActionGroupsCount()Get action state
action- id of action, defined in \ref 4_World/Classes/UserActionsComponent/_constants.c
check_focus- if true and game is unfocused, returns 0; otherwise returns actual value
Returns: actual action state as float, for regular two state buttons returns 0 or 1, for analog buttons/axes returns value in interval <0, 1> with consideration of defined deadzones
See also: LocalValue()
Returns true just in frame, when action was invoked (button was pressed)
action- id of action, defined in \ref 4_World/Classes/UserActionsComponent/_constants.c
check_focus- if true and game is unfocused, returns 0; otherwise returns actual value
Returns: true if action was invoked in that frame, false otherwise
See also: LocalPress()
Returns true just in frame, when release action happened (button was released)
action- id of action, defined in \ref 4_World/Classes/UserActionsComponent/_constants.c
check_focus- if true and game is unfocused, returns 0; otherwise returns actual value
Returns: true if action was released in that frame, false otherwise
See also: LocalRelease()
Returns true just in frame, when hold action invoked (button is hold)
action- id of action, defined in \ref 4_World/Classes/UserActionsComponent/_constants.c
check_focus- if true and game is unfocused, returns 0; otherwise returns actual value
Returns: true if action was released in that frame, false otherwise
See also: LocalHold()
Returns true just in frame, when double click action invoked (button double clicked)
action- id of action, defined in \ref 4_World/Classes/UserActionsComponent/_constants.c
check_focus- if true and game is unfocused, returns 0; otherwise returns actual value
Returns: true if action was released in that frame, false otherwise
See also: LocalDbl()
proto native void DisableKey(int key)Disable key until end of frame
key- id of key, defined in \ref KeyCode
g_Game.GetInput().DisableKey(KeyCode.KC_RETURN);proto native void EnableMouseAndKeyboard(bool enable)Enable mouse and keyboard (on consoles)
proto native bool IsEnabledMouseAndKeyboard()Returns: state of support mouse and keyboard (on consoles)
Show 27 more
, ConnectionDialogue.UpdateControlsElementVisibility(), ControlsXboxNew.OnInputDeviceChanged(), CreditsMenu.UpdateInfoPanelText(), InGameMenuXbox.OnInputDeviceChanged(), InGameMenuXbox.OnShow(), AreAllAllowedInputDevicesActive(), InviteMenu.UpdateControlsElementVisibility(), LogoutMenu.UpdateControlsElementVisibility(), MainMenuConsole.Init(), MainMenuConsole.OnInputDeviceChanged(), MainMenuConsole.OnShow(), MainMenuConsole.UpdateControlsElementVisibility(), MainMenuDlcHandlerBase.UpdateIconVisibility(), MainMenuVideo.UpdateControlsElements(), MapMenu.UpdateControlsElementVisibility(), NewsCarousel.OnInputDeviceChanged(), NewsCarousel.ShowArrowLeft(), NewsCarousel.ShowArrowRight(), OptionsMenu.Apply(), OptionsMenu.OnChanged(), OptionsMenu.OnInputDeviceChanged(), OptionsMenu.PerformSetToDefaults(), OptionsMenu.Reset(), OptionsMenu.ResetCurrentTab(), ServerBrowserMenuNew.Init(), TutorialsMenu.OnInputDeviceChanged(), and WarningMenuBase.UpdateControlsElementVisibility()proto native void EnableGamepad(bool enable)Enable gamepad (on PC)
proto native bool IsEnabledGamepad()Returns: state of support gamepad (on PC)
proto native bool IsEnabledMouseAndKeyboardEvenOnServer()Returns: state of support mouse and keyboard. If client playing on server where mouse and keyboard is disabled, then return false. (on consoles)
Show 34 more
, ControlsXboxNew.UpdateControlsElementVisibility(), GestureMenuItem.GetBoundButtonText(), GesturesMenu.UpdateControlsElements(), HandsPreview.UpdateInterval(), IngameHud.UpdateQuickbarGlobalVisibility(), InGameMenuXbox.OnInputDeviceChanged(), InGameMenuXbox.OnShow(), InGameMenuXbox.UpdateControlsElements(), AreAllAllowedInputDevicesActive(), Inventory.OnInputDeviceChanged(), Inventory.RefreshQuickbar(), Inventory.UpdateConsoleToolbar(), ItemActionsWidget.UpdatePCIconsVisibility(), ItemManager.PrepareTooltip(), LoginQueueBase.Init(), LoginTimeBase.Init(), MissionGameplay.OnUpdate(), OptionsMenu.Apply(), OptionsMenu.OnInputDeviceChanged(), OptionsMenu.UpdateControlsElementVisibility(), OptionsMenuControls.OptionsMenuControls(), OptionsMenuGame.Apply(), PasswordMenuToolbarHandler.UpdateControlsElements(), PlayerListEntryScriptedWidget.OnDoubleClick(), PlayerListEntryScriptedWidget.OnMouseButtonUp(), RadialMenu.RadialMenu(), RadialQuickbarMenu.UpdateControlsElements(), ServerBrowserMenuNew.OnInputDeviceChanged(), ServerBrowserTabConsolePages.OnInputDeviceChanged(), TabberUI.OnInputDeviceChanged(), TutorialsMenu.OnInputDeviceChanged(), TutorialsMenu.UpdateControlsElementVisibility(), UIMenuPanel.UseKeyboard(), and UIMenuPanel.UseMouse()proto native bool IsMouseConnected()Returns: Console: Last state queried from the platform operating system for the active gamepad. PC: Always true.
Show 2 more
, UpdateConnectedInputDeviceList(), and MissionBase.DisplayInputDebug()proto native bool IsKeyboardConnected()Show 2 more
, UpdateConnectedInputDeviceList(), and MissionBase.DisplayInputDebug()proto native int GetCurrentProfile()gets currently selected profile
Show 1 more
, TutorialsMenu.GetControlMappingInfo()gets profile by index
proto native int GetProfilesCount()gets profile by name
setting active profile
Show 1 more
, PresetsMenu.OnClick()proto native int GetDevicesCount()proto bool GetGamepadThumbDirection(GamepadButton thumbButton, out float angle, out float value)return true if was deflected button.
proto native void ResetActiveGamepad()clears active gamepad
Show 1 more
, DayZGame.SelectUser()proto native void SelectActiveGamepad(int gamepad)Show 1 more
, OnGamepadConnected()proto native void IdentifyGamepad(GamepadButton button)the on OnGamepadIdentification callback will return the first gamepad where the button was pressed
button- the button that needs to be pressed for the identification
proto native bool IsActiveGamepadSelected()returns true if there is an active gamepad selected.
bool IsAnyInputDeviceActive()returns true if 'Gamepad' or 'Mouse and Keyboard' is connected
returns true if 'Gamepad' or if 'Mouse/Keyboard' control is allowed locally and on server, and the respective input devicse are connected. Gamepad takes priority.
unavailableDeviceList- lists all devices that SHOULD be available, but aren't. Optional.
void UpdateConnectedInputDeviceList()currently lists only available Gamepad, Mouse, and Keyboard. Extendable as needed.
Show 3 more
, IsActiveGamepadSelected(), IsKeyboardConnected(), and IsMouseConnected()proto native EInputDeviceType GetCurrentInputDevice()Returns: Input device, with the last input event ('mouse and keyboard', 'controller' or 'unknown' if none input event was fired from the beginning).
Show 38 more
, ConnectionDialogue.Init(), ConnectionDialogue.UpdateControlsElementVisibility(), ControlsXboxNew.OnShow(), ControlsXboxNew.UpdateControlsElementVisibility(), CreditsMenu.Init(), GesturesMenu.UpdateControlsElements(), InGameMenuXbox.OnShow(), InGameMenuXbox.UpdateControlsElements(), Inventory.UpdateConsoleToolbar(), Inventory.UpdateInterval(), InviteMenu.Init(), InviteMenu.UpdateControlsElementVisibility(), ItemActionsWidget.UpdatePCIconsVisibility(), LoginQueueBase.Init(), LoginTimeBase.Init(), LogoutMenu.Init(), LogoutMenu.UpdateControlsElementVisibility(), MainMenuConsole.Init(), MainMenuConsole.OnShow(), MainMenuConsole.UpdateControlsElementVisibility(), MainMenuDlcHandlerBase.UpdateIconVisibility(), MainMenuVideo.UpdateControlsElements(), MapMenu.UpdateControlsElementVisibility(), NewsCarousel.NewsCarousel(), OptionsMenu.Refresh(), OptionsMenu.UpdateControlsElementVisibility(), PasswordMenuToolbarHandler.UpdateControlsElements(), RadialQuickbarMenu.UpdateControlsElements(), ServerBrowserMenuNew.OnShow(), ServerBrowserTabConsolePages.Construct(), TabberUI.Init(), TutorialKeybinds.GetActiveDeviceFlags(), TutorialsMenu.GetControlMappingInfo(), TutorialsMenu.OnShow(), TutorialsMenu.UpdateControlsElementVisibility(), VicinitySlotsContainer.TransferItem(), WarningMenuBase.Init(), and WarningMenuBase.UpdateControlsElementVisibility()proto native GamepadButton GetEnterButton()Returns: Button, which represent Enter/Accept button.
Show 2 more
, KeybindingsMenu.Init(), and TitleScreenMenu.Init()void OnGamepadConnected(int gamepad)callback that is fired when a new gamepad is connected
void OnGamepadDisconnected(int gamepad)callback that is fired when gamepad is disconnected
void OnGamepadIdentification(int gamepad)callback that is fired when identification was requested
Show 1 more
, IsActiveGamepadSelected()void OnMouseConnected()callback that is fired when mouse is connected (PS: and assigned to the user) does not fire on PC - mouse/keyboard assumed to always be connected
void OnMouseDisconnected()callback that is fired when mouse is disconnected does not fire on PC - mouse/keyboard assumed to always be connected
void OnKeyboardConnected()callback that is fired when keyboard is connected (PS: and assigned to the user) does not fire on PC - mouse/keyboard assumed to always be connected
void OnKeyboardDisconnected()callback that is fired when keyboard is disconnected does not fire on PC - mouse/keyboard assumed to always be connected
void OnLastInputDeviceChanged(EInputDeviceType inputDevice)called from code on different input device use