Table of Contents
Lua scripts can manipulate the LEDs of supported Ryos keyboards. Supported devices are Ryos MK Pro, Ryos TKL Pro and Ryos MK FX.
To interact with the device the eventhandler defines the table ryos
with the following fields to be called from client code. These methods use
a color table with keys red, green and blue defined. It's values are integers
in the range [0-255].
Returned by get_event*() methods.
Supported since roccat-tools version 4.0.0
Activates effects if allowed. This deactivates the keyboards light settings.
Supported since roccat-tools version 5.0.0
Returns true
if effects are allowed to be shown on device,
else false
.
Supported since roccat-tools version 5.0.0
Returns true
if all keys are off, else false
.
Supported since roccat-tools version 4.0.0
Deactivates effects. This restores keyboards light settings.
Supported since roccat-tools version 5.0.0
Returns boolean false
if script is interacting with actual
hardware, true
if it's dealing with an emulation like
in the devices config tool.
Supported since roccat-tools version 5.1.0
Returns event_type, value1 and value2. If event type is ryos.EVENT_KEY
,
value1 is an integer indicating the sdk key index, value2 is boolean
indicating the action of the event, true
if pressed,
false
if released. This function blocks until an event
is available or the stop condition is met. In this case the return
value is nil
.
Supported since roccat-tools version 4.0.0
Returns event_type, value1 and value2. If event type is ryos.EVENT_KEY
,
value1 is an integer indicating the sdk key index, value2 is boolean
indicating the action of the event, true
if pressed,
false
if released. Returns nil
if no event
occured in @microseconds time, or as soon as the stop condition is met.
Supported since roccat-tools version 4.0.0
Gets actual values of a key. Returns boolean representing current key state and a color table for the key represented by @sdk_key_index.
Supported since roccat-tools version 4.0.0
Sends the current data to the keyboard. This operation takes around 10 milliseconds.
Supported since roccat-tools version 4.0.0
Sets all keys states to the given boolean @state.
Supported since roccat-tools version 4.0.0
Sets all keys colors to the given @color table.
Supported since roccat-tools version 4.0.0
Sets single or multiple keys to a single color. @sdk is either a single integer or an array with integer values indicating the sdk key index. @color is a color table.
Supported since roccat-tools version 4.0.0
Sets multiple keys to individual colors. @table keys are integers representing sdk key index. @table values are color tables.
Supported since roccat-tools version 4.0.0
Sets single or multiple keys to a single state. @sdk is either a single integer or an array with integer values indicating the sdk key index. @state is a boolean indicating if the keys lights should get activated or deactivated.
Supported since roccat-tools version 4.0.0
Sets multiple keys to indiviual states. @table keys are integers representing sdk key index. @table values are boolean indicating the key state.
Supported since roccat-tools version 4.0.0
Returns true
if the script should exit.
Supported since roccat-tools version 4.0.0
Sleeps until @microseconds time passed or the stop condition is met.
In this case it returns true
. false
is returned
if time passed fully.
Supported since roccat-tools version 4.0.0
Returns a boolean indicating if the keyboard supports distinct color settings. At the moment the only device that supports distinct color settings is the Ryos MK FX.
Supported since roccat-tools version 4.0.0
Waits until effects are allowed to be shown on the device or the stop
condition is met. Returns true
if stop condition applies,
else false
.
Supported since roccat-tools version 5.0.0