key_up event

Occurs every time the user releases a previously pressed down key.

ExampleUsing key_up event
Shows what key the player released.
Code
<nowiki>
while true do
  local event, key_code = os.pullEvent("key_up")

  print("The player released the", keys.getName(key_code), "key")
end
    </nowiki>
key_up
Event
Returns
  • keycode : number The keycode of the key being released

Source CC:Tweaked
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.