ScriptHook: Key Binds

From Nomad DB
Revision as of 18:15, 14 April 2020 by Jan (talk | contribs)

A Script can register Key bindings.

Registering a Key Bind

To register a Key bind, use WD2 ScriptHook: manifest.json.

manifest.json

"keyBinds": {
	"test": "F5"
}

Key Handler

Use ScriptHook.RegisterKeyHandler function.

Example

Registers a callback function to a Key binding.

ScriptHook.RegisterKeyHandler("test", function()
	print("Key Bind")
})

Related Pages