Class · inherits Instance
InputContext
Collection of actions which holds related actions and defines how they interact with other contexts/actions.
About InputContext
An InputContext is a collection of actions which holds related
InputActions and defines how they interact with other
contexts and actions. Nested InputContext instances will have no effect and
ordering/priority is managed through Enabled,
Priority, and Sink.
Properties 3
Enabled
: booleanDetermines if thisInputContextis enabled or not.Determines if this
InputContextis enabled or not. Whenfalse, all of the descendant actions of the context do not receive any signals except whenEnabledis toggled fromtruetofalse, in which case a final "end" signal is triggered if a key is pressed or a two-directional input is not zero.Priority
: intThe priority level at which the context should be run.The priority level at which the context should be run (higher priority
InputContextinstances run before lower ones).Sink
: booleanDetermines whether input bindings of lower priority will be processed.When
Sinkis set totrue, inputs will not be processed for connectedInputActionbindings within contexts of lowerPriority. Contexts with the same priority will receive the input.For example, if multiple contexts contain an
InputActionwith a binding toKeyCode.Eand a higher priority context hasSinkset totrue, the lower priority contexts will not receive the input signal forKeyCode.Eand will fire no events for it.
InputContext also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.