-
-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
296 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...to_virtual_devices/json/expected_post_event_to_virtual_devices_queue/to_conditions_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"keyboard_input": { | ||
"keys": [ | ||
{ | ||
"key_code": "b" | ||
} | ||
], | ||
"modifiers": [] | ||
}, | ||
"time_stamp": 5, | ||
"type": "keyboard_input" | ||
} | ||
] |
52 changes: 52 additions & 0 deletions
52
...to_virtual_devices/json/expected_post_event_to_virtual_devices_queue/to_conditions_2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[ | ||
{ | ||
"keyboard_input": { | ||
"keys": [ | ||
{ | ||
"key_code": "b" | ||
} | ||
], | ||
"modifiers": [] | ||
}, | ||
"time_stamp": 5, | ||
"type": "keyboard_input" | ||
}, | ||
{ | ||
"keyboard_input": { | ||
"keys": [ | ||
{ | ||
"key_code": "b" | ||
}, | ||
{ | ||
"key_code": "2" | ||
} | ||
], | ||
"modifiers": [] | ||
}, | ||
"time_stamp": 10, | ||
"type": "keyboard_input" | ||
}, | ||
{ | ||
"keyboard_input": { | ||
"keys": [ | ||
{ | ||
"key_code": "b" | ||
} | ||
], | ||
"modifiers": [] | ||
}, | ||
"time_stamp": 15, | ||
"type": "keyboard_input" | ||
}, | ||
{ | ||
"consumer_input": { | ||
"keys": [ | ||
{ | ||
"consumer_key_code": "mute" | ||
} | ||
] | ||
}, | ||
"time_stamp": 20, | ||
"type": "consumer_input" | ||
} | ||
] |
41 changes: 41 additions & 0 deletions
41
...to_virtual_devices/json/expected_post_event_to_virtual_devices_queue/to_conditions_3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[ | ||
{ | ||
"keyboard_input": { | ||
"keys": [ | ||
{ | ||
"key_code": "b" | ||
} | ||
], | ||
"modifiers": [] | ||
}, | ||
"time_stamp": 5, | ||
"type": "keyboard_input" | ||
}, | ||
{ | ||
"keyboard_input": { | ||
"keys": [ | ||
{ | ||
"key_code": "b" | ||
}, | ||
{ | ||
"key_code": "1" | ||
} | ||
], | ||
"modifiers": [] | ||
}, | ||
"time_stamp": 10, | ||
"type": "keyboard_input" | ||
}, | ||
{ | ||
"keyboard_input": { | ||
"keys": [ | ||
{ | ||
"key_code": "b" | ||
} | ||
], | ||
"modifiers": [] | ||
}, | ||
"time_stamp": 15, | ||
"type": "keyboard_input" | ||
} | ||
] |
19 changes: 19 additions & 0 deletions
19
tests/src/post_event_to_virtual_devices/json/input_event_queue/to_conditions_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"device_id": 1, | ||
"event": { | ||
"momentary_switch_event": { "key_code": "f12" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"event_time_stamp": { | ||
"time_stamp": 2 | ||
}, | ||
"event_type": "key_down", | ||
"lazy": false, | ||
"original_event": { | ||
"momentary_switch_event": { "key_code": "f12" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"validity": true | ||
} | ||
] |
40 changes: 40 additions & 0 deletions
40
tests/src/post_event_to_virtual_devices/json/input_event_queue/to_conditions_2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[ | ||
{ | ||
"device_id": 1, | ||
"event": { | ||
"momentary_switch_event": { "key_code": "f12" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"event_time_stamp": { | ||
"time_stamp": 2 | ||
}, | ||
"event_type": "key_down", | ||
"lazy": false, | ||
"original_event": { | ||
"momentary_switch_event": { "key_code": "f12" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"validity": true | ||
}, | ||
{ | ||
"device_id": 1, | ||
"event": { | ||
"momentary_switch_event": { "key_code": "f10" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"event_time_stamp": { | ||
"time_stamp": 4 | ||
}, | ||
"event_type": "key_down", | ||
"lazy": false, | ||
"original_event": { | ||
"momentary_switch_event": { "key_code": "f10" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"validity": true | ||
}, | ||
{ | ||
"action": "invoke_dispatcher", | ||
"time_stamp": 1000 | ||
} | ||
] |
40 changes: 40 additions & 0 deletions
40
tests/src/post_event_to_virtual_devices/json/input_event_queue/to_conditions_3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[ | ||
{ | ||
"device_id": 1, | ||
"event": { | ||
"momentary_switch_event": { "key_code": "f12" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"event_time_stamp": { | ||
"time_stamp": 2 | ||
}, | ||
"event_type": "key_down", | ||
"lazy": false, | ||
"original_event": { | ||
"momentary_switch_event": { "key_code": "f12" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"validity": true | ||
}, | ||
{ | ||
"device_id": 1, | ||
"event": { | ||
"momentary_switch_event": { "key_code": "f11" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"event_time_stamp": { | ||
"time_stamp": 4 | ||
}, | ||
"event_type": "key_down", | ||
"lazy": false, | ||
"original_event": { | ||
"momentary_switch_event": { "key_code": "f11" }, | ||
"type": "momentary_switch_event" | ||
}, | ||
"validity": true | ||
}, | ||
{ | ||
"action": "invoke_dispatcher", | ||
"time_stamp": 1000 | ||
} | ||
] |
72 changes: 72 additions & 0 deletions
72
tests/src/post_event_to_virtual_devices/json/rules/to_conditions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
[ | ||
{ | ||
"type": "basic", | ||
"from": { | ||
"key_code": "f11", | ||
"modifiers": { "optional": ["any"] } | ||
}, | ||
"to": [ | ||
{ | ||
"set_variable": { | ||
"name": "f11_pressed", | ||
"value": true, | ||
"key_up_value": false | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "basic", | ||
"from": { | ||
"key_code": "f12", | ||
"modifiers": { "optional": ["any"] } | ||
}, | ||
"to": [ | ||
{ | ||
"key_code": "a", | ||
"conditions": [ | ||
{ | ||
"type": "variable_if", | ||
"name": "f11_pressed", | ||
"value": true | ||
} | ||
] | ||
}, | ||
{ | ||
"key_code": "b", | ||
"conditions": [ | ||
{ | ||
"type": "variable_unless", | ||
"name": "f11_pressed", | ||
"value": true | ||
} | ||
] | ||
} | ||
], | ||
"to_delayed_action": { | ||
"to_if_invoked": [{ "key_code": "f1" }], | ||
"to_if_canceled": [ | ||
{ | ||
"key_code": "1", | ||
"conditions": [ | ||
{ | ||
"type": "variable_if", | ||
"name": "f11_pressed", | ||
"value": true | ||
} | ||
] | ||
}, | ||
{ | ||
"key_code": "2", | ||
"conditions": [ | ||
{ | ||
"type": "variable_unless", | ||
"name": "f11_pressed", | ||
"value": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters