diff --git a/client/js/compatibility/utils.js b/client/js/compatibility/utils.js index 50c56900c..9012984df 100644 --- a/client/js/compatibility/utils.js +++ b/client/js/compatibility/utils.js @@ -323,7 +323,7 @@ class Utils extends SharedUtils { cppBindings.registerCompatibilityExport("Utils", Utils); -alt.Events.onKeyBoardEvent(({ key, state }) => { +alt.Events.onKeyboardEvent(({ key, state }) => { if (!Keybind.registeredHandlers.has(key)) return; const boundKeys = Keybind.registeredHandlers.get(key); diff --git a/client/js/events/client.js b/client/js/events/client.js index ba012d17f..707ad2925 100644 --- a/client/js/events/client.js +++ b/client/js/events/client.js @@ -2,7 +2,7 @@ const { Event } = requireBinding("shared/events.js"); Event.register(alt.Enums.EventType.CONNECTION_COMPLETE, "ConnectionComplete"); Event.register(alt.Enums.EventType.DISCONNECT_EVENT, "Disconnect"); -Event.register(alt.Enums.EventType.KEYBOARD_EVENT, "KeyBoardEvent"); +Event.register(alt.Enums.EventType.KEYBOARD_EVENT, "KeyboardEvent"); Event.register(alt.Enums.EventType.WEB_VIEW_EVENT, "WebViewEvent"); Event.register(alt.Enums.EventType.WEB_SOCKET_CLIENT_EVENT, "WebSocketEvent"); Event.register(alt.Enums.EventType.AUDIO_EVENT, "AudioEvent"); @@ -15,7 +15,7 @@ Event.register(alt.Enums.EventType.WINDOW_RESOLUTION_CHANGE, "WindowResolutionCh Event.register(alt.Enums.CustomEventType.KEY_UP, "KeyUp", true); Event.register(alt.Enums.CustomEventType.KEY_DOWN, "KeyDown", true); -alt.Events.onKeyBoardEvent(({ state, key }) => { +alt.Events.onKeyboardEvent(({ state, key }) => { if (state === alt.Enums.KeyState.UP) Event.invoke(alt.Enums.CustomEventType.KEY_UP, { key: key }, true); else if (state === alt.Enums.KeyState.DOWN) Event.invoke(alt.Enums.CustomEventType.KEY_DOWN, { key: key }, true); }); diff --git a/types/client/index.d.ts b/types/client/index.d.ts index 2ac0e1ecb..2943d000a 100644 --- a/types/client/index.d.ts +++ b/types/client/index.d.ts @@ -1490,8 +1490,8 @@ declare module "@altv/client" { export function onScriptRPCAnswer(callback: GenericEventCallback): altShared.Events.EventHandler; export function onceScriptRPCAnswer(callback: GenericEventCallback): altShared.Events.EventHandler; - export function onKeyBoardEvent(callback: GenericEventCallback): altShared.Events.EventHandler; - export function onceKeyBoardEvent(callback: GenericEventCallback): altShared.Events.EventHandler; + export function onKeyboardEvent(callback: GenericEventCallback): altShared.Events.EventHandler; + export function onceKeyboardEvent(callback: GenericEventCallback): altShared.Events.EventHandler; export function onKeyUp(callback: GenericEventCallback): altShared.Events.EventHandler; export function onceKeyUp(callback: GenericEventCallback): altShared.Events.EventHandler; export function onKeyDown(callback: GenericEventCallback): altShared.Events.EventHandler; @@ -1660,7 +1660,7 @@ declare module "@altv/client" { key: altShared.Enums.KeyCode; } - interface KeyBoardEventParameters { + interface KeyboardEventParameters { key: altShared.Enums.KeyCode; state: altShared.Enums.KeyState; } diff --git a/types/client/package.json b/types/client/package.json index 249c88af5..65463f50b 100644 --- a/types/client/package.json +++ b/types/client/package.json @@ -1,6 +1,6 @@ { "name": "@altv/client", - "version": "0.0.23", + "version": "0.0.24", "description": "This package contains the type definitions for the alt:V JS module v2 client types", "types": "index.d.ts", "files": [