hyTags
HomeHome DocumentationDocumentation

event-get-key

Gets the key that was pressed in a keyboard event.
Parameter
Type
Description
self
Event
The keyboard event object.
ignore-layout
Bool?
If true, returns the physical key code ignoring keyboard layout. If false, returns the key value based on the layout.
return
string
The key code or key value as a string.
Test Case:Get key from keyboard event
    <div></div>
    
    <bool-true>
    <assert-true>
    
    👆 Try to change something!
  • Test succeeded Test failed