to.lazy
to.lazy
is true
or false
. The default value is false
.
If to.lazy
is true
and to.key_code
is modifier flag such as "key_code": "left_shift"
, the to.key_code
acts as lazy modifier.
The lazy modifier does not send own key events until another key is pressed together.
Tip
The lazy modifier is designed using withto_if_alone
or key combinations such as changing left_control + h
to delete_or_backspace
in order to suppress unnecessary modifier key events.
Example
The following json changes:
left_control
to the lazy left controlleft_control + m
toreturn_or_enter
Behavior of the json:
- The
left_control
key event will not be sent when you pressleft_control
alone. - Only the
return_or_enter
key event will be sent when you pressleft_control + m
. - You can use
left_control
for other keys such asleft_control + a
,left_control + b
, etc.
[
{
"type": "basic",
"from": {
"key_code": "left_control"
},
"to": [
{
"key_code": "left_control",
"lazy": true
}
]
},
{
"type": "basic",
"from": {
"key_code": "m",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "return_or_enter"
}
]
}
]