InputEventKey.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.1">
  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/latest/tutorials/inputs/inputevent.html</link>
  11. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="get_scancode_with_modifiers" qualifiers="const">
  16. <return type="int">
  17. </return>
  18. <description>
  19. Returns the scancode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers].
  20. </description>
  21. </method>
  22. </methods>
  23. <members>
  24. <member name="echo" type="bool" setter="set_echo" getter="is_echo">
  25. If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down.
  26. </member>
  27. <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
  28. If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
  29. </member>
  30. <member name="scancode" type="int" setter="set_scancode" getter="get_scancode">
  31. Key scancode, one of the [code]KEY_*[/code] constants in [@GlobalScope].
  32. </member>
  33. <member name="unicode" type="int" setter="set_unicode" getter="get_unicode">
  34. Key unicode identifier when relevant.
  35. </member>
  36. </members>
  37. <constants>
  38. </constants>
  39. </class>