gre.key_up
gre.key_up(
code,
[channel]
)
Send a key_up event to the application with the scancode passed in the parameters. channel is an optional parameter
Parameters
| Parameter | Type | Description |
|---|---|---|
code | #string | The UTF-8 character code to inject |
channel | #string | [Optional] The Storyboard IO channel on which to send the event. If not specified the event is added directly into the current Storyboard application event queue if neither the environment variable or global GREIONAME variable are set. |
Returns
| Type | Description |
|---|---|
| #boolean | true for success, false for failure |
| #string | nil for success and an error message, e.g. "Can't open greio channel my_channel" on failure |
Example:
function CBSpaceUp()
gre.key_up(0x20)
end
function CBSendSpaceUp()
local success, error = gre.key_up(0x20, "my_channel")
if(success == false) then
print(error)
--handle error
end
end