InputEventKey.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.1.2">
  3. <brief_description>
  4. Input event type for keyboard events.
  5. </brief_description>
  6. <description>
  7. Stores key presses on the keyboard. Supports key presses, key releases and [member echo] events.
  8. </description>
  9. <tutorials>
  10. <link>https://docs.godotengine.org/en/3.1/tutorials/inputs/inputevent.html</link>
  11. </tutorials>
  12. <methods>
  13. <method name="get_scancode_with_modifiers" qualifiers="const">
  14. <return type="int">
  15. </return>
  16. <description>
  17. Returns the scancode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers].
  18. </description>
  19. </method>
  20. </methods>
  21. <members>
  22. <member name="echo" type="bool" setter="set_echo" getter="is_echo">
  23. If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down.
  24. </member>
  25. <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
  26. If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
  27. </member>
  28. <member name="scancode" type="int" setter="set_scancode" getter="get_scancode">
  29. Key scancode, one of the [code]KEY_*[/code] constants in [@GlobalScope].
  30. </member>
  31. <member name="unicode" type="int" setter="set_unicode" getter="get_unicode">
  32. Key unicode identifier when relevant.
  33. </member>
  34. </members>
  35. <constants>
  36. </constants>
  37. </class>