KeyboardState
-
class
HPS.KeyboardState: HPS.Object The KeyboardState class represents the state of a keyboard for a particular event.
Public Functions
-
void
Assign(HPS.KeyboardState in_that) Copies the source KeyboardState into this KeyboardState.
Param in_that: The source KeyboardState to copy.
-
override void
Dispose()
-
bool
Equals(HPS.KeyboardState in_that) Check if the source KeyboardState is equivalent to this KeyboardState.
Param in_that: The source KeyboardState to compare to this KeyboardState. Return: true if the objects are equivalent, false otherwise.
-
override bool
Equals(Object obj)
-
HPS.KeyboardEvent
GetActiveEvent() Get the active event for this KeyboardState. This will throw an exception if there is no active action for this KeyboardState.
Return: The action for the active keyboard codes for this KeyboardState.
-
HPS.Key[]
GetEventPath() Get the relevant list of keys up to the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event path for this KeyboardState.
Return: The relevant list of keys up to the window which had focus when the keys represented by this KeyboardState were pressed or released.
-
HPS.WindowKey
GetEventSource() Get the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event source for this KeyboardState.
Return: The window which had focus when the keys represented by this KeyboardState were pressed or released.
-
override int
GetHashCode()
-
ulong
GetKeyboardCodeCount() Get the number of keys currently down in this KeyboardState.
Return: Number of active and inactive keyboard codes.
-
HPS.KeyboardCode[]
GetKeyboardCodes() Get the list of keyboard codes for keys currently down in this KeyboardState.
Return: The list of active and inactive keyboard codes.
-
bool
GetKeyState(HPS.KeyboardCode in_key_code) Get the state of a specific keyboard code for this KeyboardState.
Param in_key_code: The keyboard code for which to query the action. Return: true if the key is down, false otherwise.
-
HPS.ModifierKeys
GetModifierKeys() Get an object representing the state of modifier keys for this KeyboardState.
Return: An object representing the state of modifier keys.
-
KeyboardState() The default constructor creates an empty KeyboardState object.
-
KeyboardState(HPS.KeyboardState in_that) The copy constructor creates a new KeyboardState object that contains the same settings as the source KeyboardState.
Param in_that: The source KeyboardState to copy.
-
override HPS.Type
ObjectType() This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
Return: The declared type of the object in question, which may differ from the true, underlying type.
-
void
Set(HPS.Key[] in_path, HPS.KeyboardEvent in_event, HPS.KeyboardCode[] in_keyboard_codes) Sets the properties of this KeyboardState.
Param in_path: The list of keys up to the window which had focus for this keyboard event. Param in_event: The keyboard event. Param in_keyboard_codes: The list of keyboard codes for keys currently down during this keyboard event.
-
void
Set(HPS.Key[] in_path, HPS.KeyboardEvent in_event, HPS.KeyboardCode[] in_keyboard_codes, HPS.ModifierKeys in_modifiers) Sets the properties of this KeyboardState.
Param in_path: The list of keys up to the window which had focus for this keyboard event. Param in_event: The keyboard event. Param in_keyboard_codes: The list of keyboard codes for keys currently down during this keyboard event. Param in_modifiers: The state of modifier keys for this keyboard event.
-
void
SetActiveEvent(HPS.KeyboardEvent in_event) Sets the active event for this KeyboardState.
Param in_event: The action for this KeyboardState.
-
void
SetEventPath(HPS.Key[] in_path) Sets the relevant list of keys up to the window which had focus for this keyboard event.
Param in_path: The relevant list of keys up to the window which had focus when the keyboard event represented by this KeyboardState underwent the active action.
-
void
SetKeyboardCodes(HPS.KeyboardCode[] in_keyboard_codes) Sets the list of keyboard codes for keys currently down in this KeyboardState.
Param in_keyboard_codes: The list of keyboard codes for keys currently down during this keyboard event.
-
void
SetModifierKeys(HPS.ModifierKeys in_modifiers) Sets an object representing the state of modifier keys for this KeyboardState.
Param in_modifiers: An object representing the state of modifier keys.
Public Static Functions
-
bool
operator!=(HPS.KeyboardState a, HPS.KeyboardState b)
-
bool
operator==(HPS.KeyboardState a, HPS.KeyboardState b)
-
void