Global
Methods
click(btn) → object
Returns an object with pointing_button
property, which can be passed to Rule#remap
as from
or to
properties.
Parameters:
Name | Type | Description |
---|---|---|
btn
|
string | button name
|
Returns:
an object like: { pointing_button: ... }
- Type:
- object
if_app(…idrpt) → object
Returns an object with type: 'frontmost_application_if'
property, which can be passed to Rule#cond
as a condition.
Parameters:
Name | Type | Description |
---|---|---|
id rpt
|
string | application id |
Returns:
an object like: { type: 'frontmost_application_if', ... }
- Type:
- object
if_lang(…langrpt) → object
Returns an object with type: 'input_source_if'
property, which can be passed to Rule#cond
as a condition.
Parameters:
Name | Type | Description |
---|---|---|
lang rpt
|
string | language code |
Returns:
an object like: { type: 'input_source_if', ... }
- Type:
- object
if_var(name, value) → object
Returns an object with type: 'variable_if'
property, which can be passed to Rule#cond
as a condition.
Parameters:
Name | Type | Description |
---|---|---|
name
|
string | variable name |
value
|
|
value to check |
Returns:
an object like: { type: 'variable_if', ... }
- Type:
- object
key(code, mods, optsopt) → object
Returns an object with key_code
property,
which can be passed to Rule#remap
as from
or to
properties.
Parameters:
Name | Type | Description |
---|---|---|
code
|
|
key code(s) |
mods
|
|
modifiers |
opts opt
|
object | optional properties |
Returns:
an object like: { key_code: ... }
- Type:
- object
set_var(name, value, optsopt) → object
Returns an object with set_variable
property, which can be passed to Rule#remap
as to
property.
Parameters:
Name | Type | Description |
---|---|---|
name
|
string | variable name |
value
|
|
value to assign |
opts opt
|
object | optional properties |
Returns:
an object like: { set_variable: { ... } }
- Type:
- object
unless_app(…idrpt) → object
Returns an object with type: 'frontmost_application_unless'
property, which can be passed to Rule#cond
as a condition.
Parameters:
Name | Type | Description |
---|---|---|
id rpt
|
string | application id |
Returns:
an object like: { type: 'frontmost_application_unless', ... }
- Type:
- object
unless_lang(…langrpt) → object
Returns an object with type: 'input_source_unless'
property, which can be passed to Rule#cond
as a condition.
Parameters:
Name | Type | Description |
---|---|---|
lang rpt
|
string | language code |
Returns:
an object like: { type: 'input_source_unless', ... }
- Type:
- object
unless_var(name, value) → object
Returns an object with type: 'variable_unless'
property, which can be passed to Rule#cond
as a condition.
Parameters:
Name | Type | Description |
---|---|---|
name
|
string | variable name |
value
|
|
value to check |
Returns:
an object like: { type: 'variable_unless', ... }
- Type:
- object