Registered Keybinding actions
A mapping of a string key to possible Actions that might execute off it
A stored cache of Keybind Actions Ids to Bindings
An alias of the movement key set tracked by the keyboard
Register a new keybinding
The namespace the Keybinding Action belongs to
A unique machine-readable id for the Keybinding Action
Configuration for keybinding data
game.keybindings.register("myModule", "showNotification", {
name: "My Settings Keybinding",
hint: "A description of what will occur when the Keybinding is executed.",
uneditable: [
{
key: "Digit1",
modifiers: ["Control"]
}
],
editable: [
{
key: "F1"
}
],
onDown: () => { ui.notifications.info("Pressed!") },
onUp: () => {},
restricted: true, // Restrict this Keybinding to gamemaster only?
reservedModifiers: ["Alt"], // On ALT, the notification is permanent instead of temporary
precedence: CONST.KEYBINDING_PRECEDENCE.NORMAL
});
Get the current Bindings of a given namespace's Keybinding Action
The namespace under which the setting is registered
The keybind action to retrieve
game.keybindings.get("myModule", "showNotification");
Set the editable Bindings of a Keybinding Action for a certain namespace and Action
The namespace under which the Keybinding is registered
The Keybinding action to set
The Bindings to assign to the Keybinding
game.keybindings.set("myModule", "showNotification", [
{
key: "F2",
modifiers: [ "CONTROL" ]
}
]);
Private
_handlePrivate
Handle keyboard movement once a small delay has elapsed to allow for multiple simultaneous key-presses.
The context data of the event
The active InteractionLayer instance
Private
_onStatic
_compareStatic
Private
_validatePrivate
A helper method that, when given a value, ensures that the returned value is a standardized Binding array
An array of keybinding assignments to be validated
An array of keybinding assignments confirmed as valid
Static
Private
_validateStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onPrivate
Open Character sheet for current token or controlled actor
The context data of the event
Static
Private
_onStatic
Private
#onStatic
Private
#onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_onStatic
Private
_on
A class responsible for managing defined game keybinding. Each keybinding is a string key/value pair belonging to a certain namespace and a certain store scope.
When Foundry Virtual Tabletop is initialized, a singleton instance of this class is constructed within the global Game object as as game.keybindings.
See