from.simultaneous
simultaneous manipulates keys which are pressed simultaneously in 50 milliseconds.
Example
This json defines manipulator which changes a+s+d to mission_control.
{
"description": "Pressing the a,s,d keys simultaneously launches Mission Control",
"manipulators": [
{
"type": "basic",
"from": {
"simultaneous": [
{ "key_code": "a" },
{ "key_code": "s" },
{ "key_code": "d" }
],
"modifiers": { "optional": ["any"] }
},
"to": [{ "apple_vendor_keyboard_key_code": "mission_control" }]
}
]
}
Note
There are some cases simultaneous does not modify events.
simultaneousdoes not modify events if anyfromevents are released before allfromevents are pressed.simultaneousdoes not modify events iffromevents are interrupted by another key_down event.
Manipulated input #1
- Input:
akey_downskey_downdkey_down
- Output:
mission_control
Manipulated input #2
- Input:
skey_downakey_downdkey_down
- Output:
mission_control
Not manipulated input #1
a is released before all input events are pressed.
- Input:
akey_downskey_downakey_updkey_down
- Output:
akey_downskey_downakey_updkey_down
Not manipulated input #2
Another key (f) is pressed before all input events are pressed.
- Input:
akey_downskey_downfkey_downdkey_down
- Output:
akey_downskey_downfkey_downdkey_down
About key_up
The key_up event is posted when you release any from events.
For example, changing tab+q to mission_control works as follows.
| Input | Output |
|---|---|
tab key_down |
— |
q key_down |
mission_control key_down |
tab key_up |
mission_control key_up |
q key_up |
— |
Change threshold milliseconds
You can adjust threshold on Karabiner-Elements Settings > Parameters.
It is same as adjusting basic.simultaneous_threshold_milliseconds parameter in json.