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.
void 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.
RegisterKeyBind(ModifierKeys, Key, Action, KeySource)
Runs action whenever key is pressed with modifiers held.
void 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.