mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-30 10:38:55 +00:00
Fix key count in input test
This commit is contained in:
parent
8c4a2a48ca
commit
67f22a6c90
@ -166,11 +166,11 @@ trim_lines
|
|||||||
|
|
||||||
compare_output_to {
|
compare_output_to {
|
||||||
[init -> test-input] Input event #1 type=PRESS code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=1 KEY_X
|
[init -> test-input] Input event #1 type=PRESS code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=1 KEY_X
|
||||||
[init -> test-input] Input event #2 type=RELEASE code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=-1 KEY_X
|
[init -> test-input] Input event #2 type=RELEASE code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=0 KEY_X
|
||||||
[init -> test-input] Input event #3 type=PRESS code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=1 BTN_LEFT
|
[init -> test-input] Input event #3 type=PRESS code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=1 BTN_LEFT
|
||||||
[init -> test-input] Input event #4 type=MOTION code=0 rx=-1 ry=0 ax=0 ay=0 key_cnt=1
|
[init -> test-input] Input event #4 type=MOTION code=0 rx=-1 ry=0 ax=0 ay=0 key_cnt=1
|
||||||
[init -> test-input] Input event #5 type=MOTION code=0 rx=0 ry=1 ax=0 ay=0 key_cnt=1
|
[init -> test-input] Input event #5 type=MOTION code=0 rx=0 ry=1 ax=0 ay=0 key_cnt=1
|
||||||
[init -> test-input] Input event #6 type=RELEASE code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=-1 BTN_LEFT
|
[init -> test-input] Input event #6 type=RELEASE code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=0 BTN_LEFT
|
||||||
[init -> usb_drv] dev_info: USB disconnect, device
|
[init -> usb_drv] dev_info: USB disconnect, device
|
||||||
[init -> usb_drv] dev_info: new full-speed USB device
|
[init -> usb_drv] dev_info: new full-speed USB device
|
||||||
[init -> usb_drv] dev_info: D L
|
[init -> usb_drv] dev_info: D L
|
||||||
@ -178,9 +178,9 @@ compare_output_to {
|
|||||||
[init -> usb_drv] dev_info: D L
|
[init -> usb_drv] dev_info: D L
|
||||||
[init -> usb_drv] dev_info: input: USB HID v1.11 Mouse [D L]
|
[init -> usb_drv] dev_info: input: USB HID v1.11 Mouse [D L]
|
||||||
[init -> test-input] Input event #7 type=PRESS code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=1 KEY_X
|
[init -> test-input] Input event #7 type=PRESS code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=1 KEY_X
|
||||||
[init -> test-input] Input event #8 type=RELEASE code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=-1 KEY_X
|
[init -> test-input] Input event #8 type=RELEASE code=45 rx=0 ry=0 ax=0 ay=0 key_cnt=0 KEY_X
|
||||||
[init -> test-input] Input event #9 type=PRESS code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=1 BTN_LEFT
|
[init -> test-input] Input event #9 type=PRESS code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=1 BTN_LEFT
|
||||||
[init -> test-input] Input event #10 type=MOTION code=0 rx=-1 ry=0 ax=0 ay=0 key_cnt=1
|
[init -> test-input] Input event #10 type=MOTION code=0 rx=-1 ry=0 ax=0 ay=0 key_cnt=1
|
||||||
[init -> test-input] Input event #11 type=MOTION code=0 rx=0 ry=1 ax=0 ay=0 key_cnt=1
|
[init -> test-input] Input event #11 type=MOTION code=0 rx=0 ry=1 ax=0 ay=0 key_cnt=1
|
||||||
[init -> test-input] Input event #12 type=RELEASE code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=-1 BTN_LEFT
|
[init -> test-input] Input event #12 type=RELEASE code=272 rx=0 ry=0 ax=0 ay=0 key_cnt=0 BTN_LEFT
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@ struct Main
|
|||||||
Env &env;
|
Env &env;
|
||||||
Input::Connection input { env };
|
Input::Connection input { env };
|
||||||
Signal_handler<Main> input_sigh { env.ep(), *this, &Main::handle_input };
|
Signal_handler<Main> input_sigh { env.ep(), *this, &Main::handle_input };
|
||||||
|
int key_cnt { 0 };
|
||||||
unsigned event_cnt { 0 };
|
unsigned event_cnt { 0 };
|
||||||
|
|
||||||
void handle_input();
|
void handle_input();
|
||||||
@ -65,7 +66,6 @@ struct Main
|
|||||||
|
|
||||||
void Main::handle_input()
|
void Main::handle_input()
|
||||||
{
|
{
|
||||||
int key_cnt = 0;
|
|
||||||
input.for_each_event([&] (Input::Event const &ev) {
|
input.for_each_event([&] (Input::Event const &ev) {
|
||||||
event_cnt++;
|
event_cnt++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user