Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Dec 29, 2024
1 parent e67d661 commit 247f33e
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[
{
"keyboard_input": {
"keys": [],
"modifiers": [
"left_shift"
]
},
"time_stamp": 5,
"type": "keyboard_input"
},
{
"keyboard_input": {
"keys": [],
"modifiers": [
"left_shift",
"left_command"
]
},
"time_stamp": 10,
"type": "keyboard_input"
},
{
"keyboard_input": {
"keys": [],
"modifiers": [
"left_shift",
"left_option",
"left_command"
]
},
"time_stamp": 15,
"type": "keyboard_input"
},
{
"keyboard_input": {
"keys": [],
"modifiers": [
"left_option",
"left_command"
]
},
"time_stamp": 20,
"type": "keyboard_input"
},
{
"keyboard_input": {
"keys": [],
"modifiers": [
"left_option"
]
},
"time_stamp": 25,
"type": "keyboard_input"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
// escape key_down
{
"device_id": 1,
"event": {
"type": "momentary_switch_event",
"momentary_switch_event": {
"key_code": "escape"
}
},
"event_type": "key_down",
"lazy": false,
"original_event": {
"type": "momentary_switch_event",
"momentary_switch_event": {
"key_code": "escape"
}
},
"event_time_stamp": {
"time_stamp": 2
},
"validity": true
}
]
26 changes: 26 additions & 0 deletions tests/src/post_event_to_virtual_devices/json/rules/vk_none.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
// specify modifiers order
"type": "basic",
"from": {
"key_code": "escape"
},
"to": [
{
"key_code": "vk_none",
"modifiers": ["left_shift"]
},
{
"key_code": "vk_none",
"modifiers": ["left_command", "left_shift"]
},
{
"key_code": "vk_none",
"modifiers": ["left_command", "left_option", "left_shift"]
},
{
"key_code": "left_option"
}
]
}
]
6 changes: 6 additions & 0 deletions tests/src/post_event_to_virtual_devices/json/tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -826,5 +826,11 @@
"rules": ["json/rules/mouse_basic.jsonc"],
"input_event_queue": "json/input_event_queue/mouse_basic_1.jsonc",
"expected_post_event_to_virtual_devices_queue": "json/expected_post_event_to_virtual_devices_queue/mouse_basic_1.jsonc"
},
{
"description": "specify modifiers order",
"rules": ["json/rules/vk_none.jsonc"],
"input_event_queue": "json/input_event_queue/vk_none_1.jsonc",
"expected_post_event_to_virtual_devices_queue": "json/expected_post_event_to_virtual_devices_queue/vk_none_1.json"
}
]

0 comments on commit 247f33e

Please sign in to comment.