Click or drag to resize

Keyboard Methods

The Keyboard type exposes the following members.

Methods
  NameDescription
Public methodGetAnyButton
Gets the button held state of any hardware button. This will return TRUE as long as any button is held. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonChanged
Returns true if any button has changed state from the previous frame to the current. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonDown
Gets the button just pressed state of any hardware button. This will only return TRUE only on the first frame the button is pressed This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonPrev
Gets the previous button held state of any hardware button. This will return TRUE if any button was held in the previous frame. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetAnyButtonUp
Gets the button just released state of any hardware button. This will only return TRUE only on the first frame the button is released This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButton
Gets the button held state of the hardware button at the specified index. This will return TRUE as long as the button is held. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonById
Gets the button held state of the hardware button at the specified element identifier id. This will return TRUE as long as the button is held. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonChanged
Returns true if the button has changed state from the previous frame to the current. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonDoublePressDown(Int32)
Gets the double press down state of the button at the specified index. This will return TRUE only on the first frame the double press is detected. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressDown(Int32, Single)
Gets the double press down state of the button at the specified index. This will return TRUE only on the first frame the double press is detected.
(Inherited from Controller.)
Public methodGetButtonDoublePressDownById(Int32)
Gets the double press down state of the button at the specified element identifier id. This will return TRUE only on the first frame the double press is detected. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressDownById(Int32, Single)
Gets the double press down state of the button at the specified element identifier id. This will return TRUE only on the first frame the double press is detected.
(Inherited from Controller.)
Public methodGetButtonDoublePressHold(Int32)
Gets the double press and hold state of the button at the specified index. This will return TRUE after the double press is detected and for as long as the button is held thereafter. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressHold(Int32, Single)
Gets the double press and hold state of the button at the specified index. This will return TRUE after the double press is detected and for as long as the button is held thereafter.
(Inherited from Controller.)
Public methodGetButtonDoublePressHoldById(Int32)
Gets the double press and hold state of the button at the specified element identifier id. This will return TRUE after the double press is detected and for as long as the button is held thereafter. This will use the default double press speed.
(Inherited from Controller.)
Public methodGetButtonDoublePressHoldById(Int32, Single)
Gets the double press and hold state of the button at the specified element identifier id. This will return TRUE after the double press is detected and for as long as the button is held thereafter.
(Inherited from Controller.)
Public methodGetButtonDown
Gets the button just pressed state of the hardware button at the specified index. This will only return TRUE only on the first frame the button is pressed This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonDownById
Gets the button just pressed state of the hardware button at the specified element identifier id. This will only return TRUE only on the first frame the button is pressed This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonIndexById
Gets the index of the Button with the specified element idenfitier id.
(Inherited from Controller.)
Public methodGetButtonIndexByKeyCode
Gets the Button index that corresponds to the specified KeyCode.
Public methodGetButtonLastTimePressed
Gets the last timestamp the button at index was active.
(Inherited from Controller.)
Public methodGetButtonLastTimePressedById
Gets the last timestamp the button with the element identifier id was active.
(Inherited from Controller.)
Public methodGetButtonLastTimeUnpressed
Gets the last timestamp the button at index was inactive.
(Inherited from Controller.)
Public methodGetButtonLastTimeUnpressedById
Gets the last timestamp the button with the element identifier id was inactive.
(Inherited from Controller.)
Public methodGetButtonPrev
Gets the previous button held state of the hardware button at the specified index. This will return TRUE if the button was held in the previous frame. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonPrevById
Gets the previous button held state of the hardware button at the specified element identifier id. This will return TRUE if the button was held in the previous frame. This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonTimePressed
Gets the length of time the button at index has been active.
(Inherited from Controller.)
Public methodGetButtonTimePressedById
Gets the length of time the button with the element identifier id has been active.
(Inherited from Controller.)
Public methodGetButtonTimeUnpressed
Gets the length of time the button at index has been inactive.
(Inherited from Controller.)
Public methodGetButtonTimeUnpressedById
Gets the length of time the button with the element identifier id has been inactive.
(Inherited from Controller.)
Public methodGetButtonUp
Gets the button just released state of the hardware button at the specified index. This will only return TRUE only on the first frame the button is released This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetButtonUpById
Gets the button just released state of the hardware button at the specified element identifier id. This will only return TRUE only on the first frame the button is released This does not take into acount any controller mapping or Actions -- this is the unmapped physical button value only. Use the Player class to get button values mapped to Actions.
(Inherited from Controller.)
Public methodGetCompoundElementById
Gets the Compound Element with the specified element identifier id.
(Inherited from Controller.)
Public methodGetCompundElementById Obsolete.
OBSOLETE: This method is deprecated. Use GetCompoundElementById(Int32) instead. Gets the Compound Element with the specified element identifier id.
(Inherited from Controller.)
Public methodGetElementById
Gets the Element with the specified element identifier id.
(Inherited from Controller.)
Public methodGetElementIdentifierById
Gets a Controller Element Identifier by id.
(Inherited from Controller.)
Public methodGetElementIdentifierByKeyCode
Gets the Controller Element Identifier corresponding to the specified KeyCode.
Public methodGetExtensionT
Gets an object used to access controller and platform-specific controller functions.
(Inherited from Controller.)
Public methodGetKey
Public methodGetKeyCodeByButtonIndex
Gets the KeyCode of the key at the specified button index.
Public methodGetKeyCodeById
Gets the KeyCode of the key with the specified element identifier id.
Public methodGetKeyDoublePressDown(KeyCode)
Public methodGetKeyDoublePressDown(KeyCode, Single)
Public methodGetKeyDoublePressHold(KeyCode)
Public methodGetKeyDoublePressHold(KeyCode, Single)
Public methodGetKeyDown
Public methodStatic memberGetKeyName(KeyCode)
Gets the display name for the specified key code. This may return words and/or symbols for some keys. Example: "Keypad 0", ";", "Back Quote". The returned value will be localized if localization is in use.
Public methodStatic memberGetKeyName(KeyCode, ModifierKeyFlags)
Creates a string containing all display names for a key and modifier key combination. This may return words and/or symbols for some keys. Example: "Keypad 0", ";", "Back Quote". Modifier keys will precede the primary key. Each key will be separated by the + character. If you need RTL support, you must build the string yourself using GetModifierKeyName(ModifierKey) and GetKeyName(KeyCode). The returned value will be localized if localization is in use.
Public methodGetKeyPrev
Public methodGetKeyTimePressed
Public methodGetKeyTimeUnpressed
Public methodGetKeyUp
Public methodGetLastTimeActive
Gets the last timestamp any button was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from Controller.)
Public methodGetLastTimeActive(Boolean)
Gets the last timestamp any button was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from Controller.)
Public methodGetLastTimeAnyButtonChanged
Gets the last timestamp any button's state changed. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from Controller.)
Public methodGetLastTimeAnyButtonPressed
Gets the last timestamp any button was active. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from Controller.)
Public methodGetLastTimeAnyElementChanged
Gets the last timestamp any element changed state. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime.
(Inherited from Controller.)
Public methodGetLastTimeAnyElementChanged(Boolean)
Gets the last timestamp any element changed state. NOTE: If comparing time against current time, always compare to ReInput.time.unscaledTime. Use raw axis values
(Inherited from Controller.)
Public methodGetModifierKey
Public methodGetModifierKeyDown
Public methodStatic memberGetModifierKeyGlyph
Gets the glyph for the specified modifier key. This will only return a glyph if a glyph provider is in use and a glyph has been defined for this element identifier.
Public methodStatic memberGetModifierKeyName(ModifierKey)
Gets the display name for the specified modifier key. This will return the long name for modifier keys (Control instead of Ctrl). To get the short name, use the ModifierKeyFlagsToString(ModifierKeyFlags, Boolean) overload. The returned value will be localized if localization is in use.
Public methodStatic memberGetModifierKeyName(ModifierKey, Boolean)
Gets the display name for the specified modifier key. The returned value will be localized if localization is in use.
Public methodGetModifierKeyPrev
Public methodGetModifierKeyTimePressed
Public methodGetModifierKeyTimeUnpressed
Public methodGetModifierKeyUp
Public methodGetTemplate(Guid)
Gets a Controller Template by type GUID.
(Inherited from Controller.)
Public methodGetTemplate(Type)
Gets a Controller Template by type.
(Inherited from Controller.)
Public methodGetTemplateT
Gets the first Controller Template that implements the specified type. Note that it is possible to have multiple Controller Templates that implement a specific type of interface such as IControllerTemplate. You should use the most specific interface type possible such as IDualAnalogGamepadTemplate instead, which would be guaranteed to only apply to a single Controller Template.
(Inherited from Controller.)
Public methodImplementsTemplate(Guid)
Determines if the Controller implements a Controller Template by type GUID.
(Inherited from Controller.)
Public methodImplementsTemplate(Type)
Determines if the Controller implements a Controller Template by type.
(Inherited from Controller.)
Public methodImplementsTemplateT
Determines if the Controller implements a Controller Template by type.
(Inherited from Controller.)
Public methodStatic memberIsModifierKey
Public methodStatic memberKeyCodeToModifierKey
Gets the modifier key for the specified key code. For example, KeyCode.LeftShift will return ModifierKey.Shift.
Public methodStatic memberKeyCodeToModifierKeyFlags
Gets the modifier key flags for the specified key code. For example, KeyCode.LeftShift will return ModifierKeyFlags.LeftShift.
Public methodStatic memberModifierKeyFlagsContain(ModifierKeyFlags, ModifierKey)
Determines if the modifier key flags contains a specific modifier key.
Public methodStatic memberModifierKeyFlagsContain(ModifierKeyFlags, KeyCode)
Determines if the modifier key flags contains a specific key.
Public methodStatic memberModifierKeyFlagsToKeyCode
Converts modifier key flags to a key code.
Public methodStatic memberModifierKeyFlagsToModifierKey
Converts modifier key flags to a modifier key.
Public methodStatic memberModifierKeyFlagsToString(ModifierKeyFlags)
Creates a string containing all display names for a modifier key combination. Each key will be separated by the + character. This will return the long name for modifier keys (Control instead of Ctrl). To get the short name, use the ModifierKeyFlagsToString(ModifierKeyFlags, Boolean) overload. If you need RTL support, you must build the string yourself using GetModifierKeyName(ModifierKey). The returned value will be localized if localization is in use.
Public methodStatic memberModifierKeyFlagsToString(ModifierKeyFlags, Boolean)
Creates a string containing all display names for a modifier key combination. Each key will be separated by the + character. If you need RTL support, you must build the string yourself using GetModifierKeyName(ModifierKey). The returned value will be localized if localization is in use.
Public methodStatic memberModifierKeyToModifierKeyFlags
Converts a modifier key to modifier key flags.
Public methodPollForAllButtons (Overrides ControllerPollForAllButtons.)
Public methodPollForAllButtonsDown (Overrides ControllerPollForAllButtonsDown.)
Public methodPollForAllElements (Inherited from Controller.)
Public methodPollForAllElementsDown (Inherited from Controller.)
Public methodPollForAllKeys
Public methodPollForAllKeysDown
Public methodPollForFirstButton (Overrides ControllerPollForFirstButton.)
Public methodPollForFirstButtonDown (Overrides ControllerPollForFirstButtonDown.)
Public methodPollForFirstElement (Inherited from Controller.)
Public methodPollForFirstElementDown (Inherited from Controller.)
Public methodPollForFirstKey
Public methodPollForFirstKeyDown
Top
See Also