API reference Obsidian.API.Client
IKeyBinding interface
A mod's key binding, which players rebind in the key binds screen like vanilla's. Register it with IClientRegistry.RegisterKeyBinding.
public interface IKeyBinding
In Obsidian.API.Client.
Properties
Identifier
string Identifier { get; }The binding's identifier, for example examplemod:open_map.
IsDown
bool IsDown { get; }Whether the key that pressed it in game is still held down, even if the binding was rebound since.
Key
string Key { get; }The key or mouse button it's bound to, in vanilla's names: key.keyboard.g, key.mouse.right, or key.keyboard.unknown when unbound.
Name
string Name { get; }The binding's name, which is also its translation key and, after key_, its key in options.txt: key.examplemod.open_map for examplemod:open_map.
Events
Pressed
event Action Pressed;Raised on the game's thread when the key is pressed in game, with no screen open.