Keybinds

object Keybinds

Reads and writes a configuration of key bindings to a JSON file.

Functions

Link copied to clipboard
operator fun get(action: ActionFromKey): Optional<KeyCode>

Retrieve the keys bound to a certain action.

Link copied to clipboard
fun load()

Load the binds from a file in the file system, reverting to classpath on failure.

Link copied to clipboard
fun save()

Write the binds to the file system.

Link copied to clipboard
operator fun set(action: ActionFromKey, key: KeyCode)

Associate an action with a set of keys.

Properties

Link copied to clipboard
var config: Map<ActionFromKey, KeyCode>

The currently loaded configuration.