On this page
britzl/defold-input/in.cursor
Cross-platform input handling for Defold: keyboard, mouse, gamepad, touch, and on-screen controls.
- GitHub: britzl/defold-input — pinned to
2fe3aed- Pick a release from britzl/defold-input releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as cursor from "in.cursor"
- Pick a release from britzl/defold-input releases and add its Source code (zip) URL (or a packaged
Functions
trigger(message_id: Hash | string, message: {}): boolean
Parameters
message_id:Hash | stringmessage:{}
Returns
boolean
listen(cursor_url: Url, message_id: Hash, fn: ListenerFunction)
Parameters
cursor_url:Urlmessage_id:Hashfn:ListenerFunction
init()
final()
reset(cursor_url?: Url)
Parameters
cursor_url?:Url