Interface IKeyMappingInput
@NonExtendable
public interface IKeyMappingInput
An immutable combination of a keyboard or mouse input and physical modifiers.
Represents captured input or a binding resolved for the current platform.
Inputs are equal when their keys and both modifier sets are equal.
- Since:
- 0.6.0
-
Method Summary
Modifier and TypeMethodDescriptionGet additional modifiers supplied by other mods.com.mojang.blaze3d.platform.InputConstants.KeygetKey()Get the main keyboard or mouse input.Get the physical standard modifiers in this combination.Create a binding requiring this input's physical modifiers.withCustomModifiers(Set<String> customModifiers) Create an input combination with the same key and standard modifiers and different custom modifiers.
-
Method Details
-
getKey
com.mojang.blaze3d.platform.InputConstants.Key getKey()Get the main keyboard or mouse input.- Returns:
- the input, or
InputConstants.UNKNOWNwhen resolving an unbound binding - Since:
- 0.6.0
-
getModifiers
Set<KeyInputModifier> getModifiers()Get the physical standard modifiers in this combination.- Returns:
- an immutable set of modifiers, or an empty set when none are present
- Since:
- 0.6.0
-
toBinding
IKeyMappingBinding toBinding()Create a binding requiring this input's physical modifiers. All standard and custom modifiers are preserved.- Returns:
- a binding with physical modifier requirements
- Since:
- 0.6.0
-
getCustomModifiers
-
withCustomModifiers
Create an input combination with the same key and standard modifiers and different custom modifiers. An unknown input has no modifiers.- Parameters:
customModifiers- replacement identifiers matching[a-z0-9_.:/-]+, excluding standard modifier names andnone- Returns:
- an immutable input snapshot
- Throws:
IllegalArgumentException- if a custom identifier is invalid or reserved- Since:
- 0.6.0
-