keyboard.isup(key)
Checks if a key is up.
Parameters
key
Astring
or a number
that represents the key to be checked for up position. See the list of supported key codes.
Return value
This functiontrue
if the key is up or false
otherwise.
Example
local kb = require "keyboard"
local ui = require "ui"
local win = ui.Window("Press the SPACE key", 400, 280)
local lbl = ui.Label(win, "Press the SPACE key to hide this message !")
lbl:center()
ui.run(win)
async(function()
while win.visible do
sleep()
lbl.visible = kb.isup("SPACE")
end
end)
waitall()