key_up event

From ComputerCraft
Jump to: navigation, search
key_up
Event
Returns
  • keycode : number The keycode of the key being released

Source CC:Tweaked

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

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

  print("The player released the", keys.getName(key_code), "key")
end