public final class KeyboardState extends ValueType implements IEquatable<KeyboardState>
Constructor and Description |
---|
KeyboardState(Keys... keys)
Initializes a new instance of the KeyboardState class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Equals(KeyboardState other)
Indicates whether the current object is equal to another object of the same type.
|
boolean |
equals(java.lang.Object obj)
Returns a value that indicates whether the current instance is equal to a specified object.
|
KeyState |
get(Keys key)
Returns the state of a particular key.
|
Keys[] |
GetPressedKeys()
Gets an array of values that correspond to the keyboard keys that are currently being pressed.
|
int |
hashCode()
Gets the hash code for this instance.
|
boolean |
IsKeyDown(Keys key)
Returns whether a specified key is currently being pressed.
|
boolean |
IsKeyUp(Keys key)
Returns whether a specified key is currently not pressed.
|
public KeyboardState(Keys... keys)
keys
- Array or parameter list of Keys to initialize as pressed.public KeyState get(Keys key)
key
- Enumerated value representing the key to query.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to compare this object to.public boolean Equals(KeyboardState other)
IEquatable
Equals
in interface IEquatable<KeyboardState>
other
- An object to compare with this object.public int hashCode()
hashCode
in class java.lang.Object
public Keys[] GetPressedKeys()
public boolean IsKeyDown(Keys key)
key
- Enumerated value that specifies the key to query.public boolean IsKeyUp(Keys key)
key
- Enumerated value that specifies the key to query.