ControllerRegistry

Global registry for keymaps.

Constructor

new ControllerRegistry()

Create a new controller registry.

Methods

add(id, map)

Add a controller mapping.
Parameters:
NameTypeDescription
idstringThe ID of the controller
mapObject.<string, function()>The keymap of the controller

get(id) → {Controller}

Get a controller mapping by specified ID.
Parameters:
NameTypeDescription
idstringThe unique ID of the controller
Returns:
The controller
Type: 
Controller

makeBuiltin()

Register built-in controllers.