Interface IInput
Namespace: OblivionMP.SDK
Assembly: OblivionMP.SDK.dll
Key binds, and whether the keyboard is free for the game right now.
public interface IInput
Remarks
A bound action runs on the ECS thread, like a service's Update, so it can read and change entities directly.
Methods
CanApplyInput()
Whether keyboard input reaches the game, rather than a text field or menu that has the keyboard.
bool CanApplyInput()
Returns
RegisterKeyBind(Key, Action, KeySource)
Runs action whenever key is pressed.
IDisposable RegisterKeyBind(Key key, Action action, KeySource source = KeySource.Polled)
Parameters
key Key
The key to bind.
action Action
What to run when the key is pressed.
source KeySource
Where the press comes from. Polled unless said otherwise.
Returns
The bind. Dispose it to remove this bind, leaving any other bind on the same key in place.
RegisterKeyBind(ModifierKeys, Key, Action, KeySource)
Runs action whenever key is pressed with modifiers held.
IDisposable RegisterKeyBind(ModifierKeys modifiers, Key key, Action action, KeySource source = KeySource.Polled)
Parameters
modifiers ModifierKeys
The modifier keys to hold, such as Ctrl, Alt or Shift.
key Key
The key to bind.
action Action
What to run when the combination is pressed.
source KeySource
Where the press comes from. Polled unless said otherwise.
Returns
The bind. Dispose it to remove this bind, leaving any other bind on the same combination in place.