Comments (30)
Hi.
It should work, or at least not crash like that. Can you try with the latest master by installing from git?
from syngesture.
$ cargo install --path .
Installing syngestures v1.0.1 (/opt/syngesture)
Updating crates.io index
Downloaded cfg-if v1.0.0
Downloaded serde_repr v0.1.10
Downloaded proc-macro2 v1.0.51
Downloaded toml v0.5.11
Downloaded serde v1.0.152
Downloaded unicode-ident v1.0.6
Downloaded bitflags v1.3.2
Downloaded cc v1.0.79
Downloaded evdev-rs v0.6.1
Downloaded syn v1.0.109
Downloaded serde_derive v1.0.152
Downloaded quote v1.0.23
Downloaded pkg-config v0.3.26
Downloaded log v0.4.17
Downloaded evdev-sys v0.2.5
Downloaded libc v0.2.139
Downloaded 16 crates (1.5 MB) in 1.46s
Compiling proc-macro2 v1.0.51
Compiling quote v1.0.23
Compiling unicode-ident v1.0.6
Compiling syn v1.0.109
Compiling cc v1.0.79
Compiling serde_derive v1.0.152
Compiling pkg-config v0.3.26
Compiling libc v0.2.139
Compiling log v0.4.17
Compiling serde v1.0.152
Compiling cfg-if v1.0.0
Compiling bitflags v1.3.2
Compiling evdev-sys v0.2.5
Compiling evdev-rs v0.6.1
Compiling serde_repr v0.1.10
Compiling toml v0.5.11
Compiling syngestures v1.0.1 (/opt/syngesture)
error[E0432]: unresolved import `std::os::fd::AsRawFd`
--> src/main.rs:14:5
|
14 | use std::os::fd::AsRawFd;
| ^^^^^^^^^^^^^^^^^^^^ no `AsRawFd` in `os::fd`
error[E0603]: module `fd` is private
--> src/main.rs:14:14
|
14 | use std::os::fd::AsRawFd;
| ^^ private module
|
note: the module `fd` is defined here
error[E0658]: use of unstable library feature 'io_safety'
--> src/epoll.rs:6:9
|
6 | fd: OwnedFd,
| ^^^^^^^
|
= note: see issue #87074 <https://github.com/rust-lang/rust/issues/87074> for more information
error[E0658]: use of unstable library feature 'io_safety'
--> src/epoll.rs:36:26
|
36 | fd: unsafe { OwnedFd::from_raw_fd(fd) },
| ^^^^^^^
|
= note: see issue #87074 <https://github.com/rust-lang/rust/issues/87074> for more information
error[E0599]: no method named `as_raw_fd` found for reference `&File` in the current scope
--> src/main.rs:117:39
|
117 | let device_fd = device.file().as_raw_fd();
| ^^^^^^^^^ method not found in `&File`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
7 | use std::os::unix::io::AsRawFd;
|
Some errors have detailed explanations: E0432, E0599, E0603, E0658.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `syngestures` due to 5 previous errors
error: failed to compile `syngestures v1.0.1 (/opt/syngesture)`, intermediate artifacts can be found at `/opt/syngesture/target`
from syngesture.
What version of rust are you running? I think it might be too old.
from syngesture.
# rustc -V
rustc 1.61.0
from syngesture.
Can you upgrade to 1.67? It's compiling for me.
from syngesture.
Almost the same result when I tap or trying to scroll:
# RUST_BACKTRACE=full ./syngestures
thread '<unnamed>' panicked at 'index out of bounds: the len is 5 but the index is 11', src/events.rs:268:25
stack backtrace:
0: 0x561e865aa0aa - std::backtrace_rs::backtrace::libunwind::trace::h79937bc171ada62c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x561e865aa0aa - std::backtrace_rs::backtrace::trace_unsynchronized::h2292bca8571cb919
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x561e865aa0aa - std::sys_common::backtrace::_print_fmt::h9c461f248e4ae90d
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:65:5
3: 0x561e865aa0aa - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he9fe6bf1a39182e1
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:44:22
4: 0x561e865cd60e - core::fmt::write::h032658c119c720d7
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/fmt/mod.rs:1208:17
5: 0x561e865a7b65 - std::io::Write::write_fmt::h299fc90dfae41c0d
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/io/mod.rs:1682:15
6: 0x561e865a9e75 - std::sys_common::backtrace::_print::heb70d25df9937e3f
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:47:5
7: 0x561e865a9e75 - std::sys_common::backtrace::print::had745c0a76b8b521
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:34:9
8: 0x561e865ab65f - std::panicking::default_hook::{{closure}}::h1ea782cdfa2fd097
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:267:22
9: 0x561e865ab39b - std::panicking::default_hook::h1cc3af63455a163c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:286:9
10: 0x561e865abd6c - std::panicking::rust_panic_with_hook::h5cafdc4b3bfd5528
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:688:13
11: 0x561e865abb09 - std::panicking::begin_panic_handler::{{closure}}::hf31c60f40775892c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:579:13
12: 0x561e865aa55c - std::sys_common::backtrace::__rust_end_short_backtrace::h28a5c7be595826cd
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:137:18
13: 0x561e865ab812 - rust_begin_unwind
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
14: 0x561e86552843 - core::panicking::panic_fmt::h8fa27a0b37dd98b7
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
15: 0x561e86552992 - core::panicking::panic_bounds_check::hd27fa6e100ea4568
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:147:5
16: 0x561e8656d107 - syngestures::events::EventLoop::add_event::hfedf7689c9bd7cfc
17: 0x561e865660fb - std::sys_common::backtrace::__rust_begin_short_backtrace::h442471c7a3b74743
18: 0x561e8657c520 - core::ops::function::FnOnce::call_once{{vtable.shim}}::ha874544c8018c3d1
19: 0x561e865b0203 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb77d8d72ebcf79c4
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/alloc/src/boxed.rs:2000:9
20: 0x561e865b0203 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc08c3353e1568487
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/alloc/src/boxed.rs:2000:9
21: 0x561e865b0203 - std::sys::unix::thread::Thread::new::thread_start::h7168e596cd5e5ce6
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys/unix/thread.rs:108:17
22: 0x7f5463b49402 - start_thread
at ./nptl/./nptl/pthread_create.c:442:8
23: 0x7f5463bd8590 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
24: 0x0 - <unknown>
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', src/main.rs:171:23
stack backtrace:
0: 0x561e865aa0aa - std::backtrace_rs::backtrace::libunwind::trace::h79937bc171ada62c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x561e865aa0aa - std::backtrace_rs::backtrace::trace_unsynchronized::h2292bca8571cb919
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x561e865aa0aa - std::sys_common::backtrace::_print_fmt::h9c461f248e4ae90d
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:65:5
3: 0x561e865aa0aa - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he9fe6bf1a39182e1
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:44:22
4: 0x561e865cd60e - core::fmt::write::h032658c119c720d7
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/fmt/mod.rs:1208:17
5: 0x561e865a7b65 - std::io::Write::write_fmt::h299fc90dfae41c0d
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/io/mod.rs:1682:15
6: 0x561e865a9e75 - std::sys_common::backtrace::_print::heb70d25df9937e3f
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:47:5
7: 0x561e865a9e75 - std::sys_common::backtrace::print::had745c0a76b8b521
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:34:9
8: 0x561e865ab65f - std::panicking::default_hook::{{closure}}::h1ea782cdfa2fd097
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:267:22
9: 0x561e865ab39b - std::panicking::default_hook::h1cc3af63455a163c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:286:9
10: 0x561e865abd6c - std::panicking::rust_panic_with_hook::h5cafdc4b3bfd5528
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:688:13
11: 0x561e865abb09 - std::panicking::begin_panic_handler::{{closure}}::hf31c60f40775892c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:579:13
12: 0x561e865aa55c - std::sys_common::backtrace::__rust_end_short_backtrace::h28a5c7be595826cd
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:137:18
13: 0x561e865ab812 - rust_begin_unwind
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
14: 0x561e86552843 - core::panicking::panic_fmt::h8fa27a0b37dd98b7
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
15: 0x561e86552cd3 - core::result::unwrap_failed::h62abf61e411aaa08
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/result.rs:1791:5
16: 0x561e86569546 - syngestures::main::h5243241bb8345112
17: 0x561e86565ea3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h247117355fbe1f29
18: 0x561e865667d9 - std::rt::lang_start::{{closure}}::h4b5c9a6fa6cbbe01
19: 0x561e865a3dcc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hfa1c3687c9a20bb8
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs:606:13
20: 0x561e865a3dcc - std::panicking::try::do_call::h0497133ebe1341e5
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:483:40
21: 0x561e865a3dcc - std::panicking::try::h6c3de05c7ca5d07f
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:447:19
22: 0x561e865a3dcc - std::panic::catch_unwind::h969058ecb5334b30
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panic.rs:137:14
23: 0x561e865a3dcc - std::rt::lang_start_internal::{{closure}}::h0de6d98cafb42a58
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/rt.rs:148:48
24: 0x561e865a3dcc - std::panicking::try::do_call::h77301dcf43953993
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:483:40
25: 0x561e865a3dcc - std::panicking::try::h45b05523a2fe135a
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:447:19
26: 0x561e865a3dcc - std::panic::catch_unwind::hd95cea544b2b9bd2
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panic.rs:137:14
27: 0x561e865a3dcc - std::rt::lang_start_internal::hd16e6ff7bf05a444
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/rt.rs:148:20
28: 0x561e86569bc5 - main
29: 0x7f5463adc510 - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
30: 0x7f5463adc5c9 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:381:3
31: 0x561e86552e15 - _start
32: 0x0 - <unknown>
from syngesture.
Ok, it seems the apple touch pad supports more than 5 tools.
Can you update to the latest master and rebuild? I just pushed a commit that might fix it.
from syngesture.
Now it doesn't panic, but gestures don't work, event tap with two fingers. I can only scroll with touch surface of this mouse.
My config (default):
[[device]]
device = "/dev/input/event3"
gestures = [
# Emulate right-click. Don't use this if two-finger tap to right-click already works
{ type = "tap", fingers = 2, execute = "xdotool click 3" },
# Emulate middle-click
{ type = "tap", fingers = 3, execute = "xdotool click 2" },
# Navigate next
{ type = "swipe", direction = "right", fingers = 3, execute = "xdotool key alt+Right" },
# Navigate previous
{ type = "swipe", direction = "left", fingers = 3, execute = "xdotool key alt+Left" },
# Next desktop/workspace
{ type = "swipe", direction = "right", fingers = 4, execute = "xdotool key Super_L+Right" },
# Previous desktop/workspace
{ type = "swipe", direction = "left", fingers = 4, execute = "xdotool key Super_L+Left" },
# Enter multi-tasking view
{ type = "swipe", direction = "up", fingers = 4, execute = "xdotool key Super_L+Down" },
# Leave multi-tasking view
{ type = "swipe", direction = "down", fingers = 4, execute = "xdotool key Super_L+Down" },
]
from syngesture.
Use cargo run --features logging
to get a log of all events and gesture detection, and see if it recognizes your inputs.
from syngesture.
Don't know how to read it. Tap with two fingers:
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 13 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 9 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 6 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > Received report but indeterminate start
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Received report but indeterminate start
DEBUG syngestures::events > Processing report with 6 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 9 events
DEBUG syngestures::events > Received report but indeterminate start
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures > EAGAIN
from syngesture.
I might have to increase what gets logged in order to be able to figure this out since the actual evdev events are not being shown.
from syngesture.
Ok, I pushed another commit that now logs the raw events captured from the evdev device. Can you post the output of a single gesture (say swipe up with one finger) making sure not to include any other trackpad events such as taps, clicks, or other gestures (use the keyboard to begin the process and ctrl-c to terminate as soon as you've finished with the gesture).
from syngesture.
Swipe up with one finger:
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TRACKING_ID: 4465
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 168
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 252
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -21
TRACE syngestures::events > ABS_MT_POSITION_Y: 576
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 240
TRACE syngestures::events > ABS_MT_POSITION_Y: 557
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 232
TRACE syngestures::events > ABS_MT_POSITION_Y: 541
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 170
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 240
TRACE syngestures::events > ABS_MT_POSITION_Y: 526
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 169
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 260
TRACE syngestures::events > ABS_MT_POSITION_X: -19
TRACE syngestures::events > ABS_MT_POSITION_Y: 503
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 280
TRACE syngestures::events > ABS_MT_POSITION_X: -11
TRACE syngestures::events > ABS_MT_POSITION_Y: 477
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 172
TRACE syngestures::events > ABS_MT_POSITION_X: -8
TRACE syngestures::events > ABS_MT_POSITION_Y: 449
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 220
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 296
TRACE syngestures::events > ABS_MT_POSITION_X: 1
TRACE syngestures::events > ABS_MT_POSITION_Y: 414
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 256
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 316
TRACE syngestures::events > ABS_MT_POSITION_X: 4
TRACE syngestures::events > ABS_MT_POSITION_Y: 376
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 264
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 344
TRACE syngestures::events > ABS_MT_POSITION_X: 14
TRACE syngestures::events > ABS_MT_POSITION_Y: 336
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 284
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 364
TRACE syngestures::events > ABS_MT_POSITION_X: 24
TRACE syngestures::events > ABS_MT_POSITION_Y: 273
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 312
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 372
TRACE syngestures::events > ABS_MT_POSITION_X: 35
TRACE syngestures::events > ABS_MT_POSITION_Y: 204
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 324
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 380
TRACE syngestures::events > ABS_MT_POSITION_X: 46
TRACE syngestures::events > ABS_MT_POSITION_Y: 132
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 356
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 408
TRACE syngestures::events > ABS_MT_POSITION_X: 60
TRACE syngestures::events > ABS_MT_POSITION_Y: 60
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 48
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 368
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 440
TRACE syngestures::events > ABS_MT_POSITION_X: 76
TRACE syngestures::events > ABS_MT_POSITION_Y: -10
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 396
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 452
TRACE syngestures::events > ABS_MT_POSITION_X: 90
TRACE syngestures::events > ABS_MT_POSITION_Y: -52
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 12
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 416
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 432
TRACE syngestures::events > ABS_MT_ORIENTATION: 6
TRACE syngestures::events > ABS_MT_POSITION_X: 110
TRACE syngestures::events > ABS_MT_POSITION_Y: -111
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 12
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 444
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 392
TRACE syngestures::events > ABS_MT_ORIENTATION: 5
TRACE syngestures::events > ABS_MT_POSITION_X: 124
TRACE syngestures::events > ABS_MT_POSITION_Y: -142
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 472
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 344
TRACE syngestures::events > ABS_MT_POSITION_X: 137
TRACE syngestures::events > ABS_MT_POSITION_Y: -187
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > Received report but indeterminate start
from syngesture.
Single tap with 2 fingers:
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TRACKING_ID: 4567
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 224
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 220
TRACE syngestures::events > ABS_MT_ORIENTATION: -1
TRACE syngestures::events > ABS_MT_POSITION_X: -333
TRACE syngestures::events > ABS_MT_POSITION_Y: 592
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TRACKING_ID: 4568
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 352
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 452
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: 745
TRACE syngestures::events > ABS_MT_POSITION_Y: 564
TRACE syngestures::events > <IGNORED> EV_REL(REL_Y): 1
DEBUG syngestures::events > Processing report with 14 events
INFO syngestures::events > Maximum slot count increased to 12
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 226
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 228
TRACE syngestures::events > ABS_MT_POSITION_X: -332
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 350
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 450
TRACE syngestures::events > ABS_MT_POSITION_X: 747
DEBUG syngestures::events > Processing report with 8 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 226
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 340
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 449
DEBUG syngestures::events > Processing report with 6 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 229
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 229
TRACE syngestures::events > ABS_MT_ORIENTATION: -2
TRACE syngestures::events > ABS_MT_POSITION_X: -331
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 348
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 240
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 252
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -330
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 346
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 440
DEBUG syngestures::events > Processing report with 8 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 242
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 268
TRACE syngestures::events > ABS_MT_POSITION_X: -328
TRACE syngestures::events > ABS_MT_POSITION_Y: 594
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 343
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 432
DEBUG syngestures::events > Processing report with 8 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 241
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 266
TRACE syngestures::events > ABS_MT_POSITION_X: -327
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 296
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 408
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 252
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 296
TRACE syngestures::events > ABS_MT_POSITION_X: -325
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 240
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 328
TRACE syngestures::events > ABS_MT_POSITION_X: 746
DEBUG syngestures::events > Processing report with 8 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -324
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 4
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
TRACE syngestures::events > ABS_MT_SLOT: 11
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Received report but indeterminate start
from syngesture.
Ok, the Magic Mouse driver doesn't generate any ABS_X
and ABS_Y
events that we use to calculate the overall position of the fingers to track the (overall) movement. It only generates the per-tool ABS_MT_POSITION_X
and ABS_MT_POSITION_Y
(and sometimes only one of those if it deems the other to be noise).
I pushed some more commits to master that changes how these values are calculated when they're not provided by the driver. Can you give it a try?
from syngesture.
Swipe up with 1 finger
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TRACKING_ID: 8069
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 336
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 360
TRACE syngestures::events > ABS_MT_ORIENTATION: -6
TRACE syngestures::events > ABS_MT_POSITION_X: -29
TRACE syngestures::events > ABS_MT_POSITION_Y: 750
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 324
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 358
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -31
TRACE syngestures::events > ABS_MT_POSITION_Y: 727
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 322
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 357
TRACE syngestures::events > ABS_MT_POSITION_Y: 707
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 319
TRACE syngestures::events > ABS_MT_POSITION_Y: 695
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_POSITION_Y: 681
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 321
TRACE syngestures::events > ABS_MT_POSITION_X: -29
TRACE syngestures::events > ABS_MT_POSITION_Y: 665
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 372
TRACE syngestures::events > ABS_MT_POSITION_X: -26
TRACE syngestures::events > ABS_MT_POSITION_Y: 647
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 324
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 374
TRACE syngestures::events > ABS_MT_POSITION_X: -18
TRACE syngestures::events > ABS_MT_POSITION_Y: 628
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 316
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 384
TRACE syngestures::events > ABS_MT_POSITION_X: -16
TRACE syngestures::events > ABS_MT_POSITION_Y: 606
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 392
TRACE syngestures::events > ABS_MT_POSITION_X: -12
TRACE syngestures::events > ABS_MT_POSITION_Y: 583
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 314
TRACE syngestures::events > ABS_MT_POSITION_X: -9
TRACE syngestures::events > ABS_MT_POSITION_Y: 557
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 313
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 400
TRACE syngestures::events > ABS_MT_POSITION_X: -5
TRACE syngestures::events > ABS_MT_POSITION_Y: 519
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 344
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 402
TRACE syngestures::events > ABS_MT_POSITION_X: -2
TRACE syngestures::events > ABS_MT_POSITION_Y: 477
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 368
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 412
TRACE syngestures::events > ABS_MT_POSITION_X: -1
TRACE syngestures::events > ABS_MT_POSITION_Y: 432
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 404
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 420
TRACE syngestures::events > ABS_MT_ORIENTATION: -5
TRACE syngestures::events > ABS_MT_POSITION_Y: 385
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 428
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 422
TRACE syngestures::events > ABS_MT_ORIENTATION: -3
TRACE syngestures::events > ABS_MT_POSITION_X: -3
TRACE syngestures::events > ABS_MT_POSITION_Y: 333
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 436
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 425
TRACE syngestures::events > ABS_MT_ORIENTATION: -1
TRACE syngestures::events > ABS_MT_POSITION_X: -6
TRACE syngestures::events > ABS_MT_POSITION_Y: 278
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 444
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 436
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -14
TRACE syngestures::events > ABS_MT_POSITION_Y: 223
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 464
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 448
TRACE syngestures::events > ABS_MT_POSITION_Y: 167
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 476
TRACE syngestures::events > ABS_MT_POSITION_X: -16
TRACE syngestures::events > ABS_MT_POSITION_Y: 113
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 484
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 460
TRACE syngestures::events > ABS_MT_POSITION_Y: 59
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 496
TRACE syngestures::events > ABS_MT_ORIENTATION: 2
TRACE syngestures::events > ABS_MT_POSITION_Y: 27
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 498
TRACE syngestures::events > ABS_MT_ORIENTATION: 1
TRACE syngestures::events > ABS_MT_POSITION_X: -18
TRACE syngestures::events > ABS_MT_POSITION_Y: -18
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 497
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 458
TRACE syngestures::events > ABS_MT_POSITION_Y: -59
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 448
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_Y: -80
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 494
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 436
TRACE syngestures::events > ABS_MT_POSITION_Y: -110
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > <IGNORED> EV_REL(REL_WHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 493
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 424
TRACE syngestures::events > ABS_MT_ORIENTATION: 2
TRACE syngestures::events > ABS_MT_POSITION_X: -20
TRACE syngestures::events > ABS_MT_POSITION_Y: -135
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 516
TRACE syngestures::events > ABS_MT_POSITION_X: -22
TRACE syngestures::events > ABS_MT_POSITION_Y: -154
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 400
TRACE syngestures::events > ABS_MT_ORIENTATION: 1
TRACE syngestures::events > ABS_MT_POSITION_X: -25
TRACE syngestures::events > ABS_MT_POSITION_Y: -173
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -27
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
from syngesture.
Single tap with 2 fingers:
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TRACKING_ID: 8110
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 280
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 356
TRACE syngestures::events > ABS_MT_POSITION_X: -472
TRACE syngestures::events > ABS_MT_POSITION_Y: 265
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TRACKING_ID: 8111
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 468
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 440
TRACE syngestures::events > ABS_MT_POSITION_X: 746
TRACE syngestures::events > ABS_MT_POSITION_Y: 261
DEBUG syngestures::events > Processing report with 12 events
INFO syngestures::events > Maximum slot count increased to 9
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 354
TRACE syngestures::events > ABS_MT_POSITION_X: -471
TRACE syngestures::events > ABS_MT_POSITION_Y: 263
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 466
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 438
TRACE syngestures::events > ABS_MT_ORIENTATION: 5
TRACE syngestures::events > ABS_MT_POSITION_X: 745
TRACE syngestures::events > ABS_MT_POSITION_Y: 260
DEBUG syngestures::events > Processing report with 10 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 282
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 353
TRACE syngestures::events > ABS_MT_POSITION_Y: 260
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 463
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 437
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
DEBUG syngestures::events > Processing report with 8 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 285
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 459
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 434
TRACE syngestures::events > ABS_MT_ORIENTATION: 10
TRACE syngestures::events > ABS_MT_POSITION_X: 744
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 304
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 364
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 458
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 431
DEBUG syngestures::events > Processing report with 6 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 292
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 362
TRACE syngestures::events > ABS_MT_POSITION_X: -473
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 428
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 416
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_Y: 259
DEBUG syngestures::events > Processing report with 9 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 264
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 340
TRACE syngestures::events > ABS_MT_POSITION_Y: 262
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 368
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 384
TRACE syngestures::events > ABS_MT_POSITION_Y: 256
DEBUG syngestures::events > Processing report with 8 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 272
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 328
TRACE syngestures::events > ABS_MT_POSITION_Y: 270
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 312
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 288
TRACE syngestures::events > ABS_MT_ORIENTATION: 6
TRACE syngestures::events > ABS_MT_POSITION_X: 732
TRACE syngestures::events > ABS_MT_POSITION_Y: 255
DEBUG syngestures::events > Processing report with 10 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report without any tools detected
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
TRACE syngestures::events > ABS_MT_POSITION_Y: 254
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report but indeterminate start
TRACE syngestures::events > ABS_MT_SLOT: 3
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
TRACE syngestures::events > ABS_MT_SLOT: 8
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Received report but indeterminate start
from syngesture.
Do you know what driver you are using? What it emits is so different from everything else I've seen, and as far as I can tell, is contrary to what the spec says.
- BTN_TOOL_:
- These codes are used in conjunction with input trackpads, tablets, and
touchscreens. These devices may be used with fingers, pens, or other tools.
When an event occurs and a tool is used, the corresponding BTN_TOOL_
code should be set to a value of 1. When the tool is no longer interacting
with the input device, the BTN_TOOL_ code should be reset to 0. All
trackpads, tablets, and touchscreens should use at least one BTN_TOOL_
code when events are generated.
Yours doesn't generate any BTN_TOOL_FINGER/BTN_TOOL_DOUBLETAP/BTN_TOOL_TRIPLETAP/BTN_TOOL_QUADTAP events.
Anyway, I pushed some more commits to calculate when these should have been generated as well. Can you give it a try?
from syngesture.
It detects some gestures but in most cases counts fingers as +1. For example, tap with one finger detects as two:
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 9
TRACE syngestures::events > ABS_MT_TRACKING_ID: 10338
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 328
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 508
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: 112
TRACE syngestures::events > ABS_MT_POSITION_Y: 372
DEBUG syngestures::events > Processing report with 7 events
INFO syngestures::events > Maximum slot count increased to 10
DEBUG syngestures::events > 2 finger press (calculated)
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 320
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 484
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 312
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 468
TRACE syngestures::events > ABS_MT_POSITION_X: 109
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 310
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 448
TRACE syngestures::events > ABS_MT_POSITION_X: 107
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 309
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 440
TRACE syngestures::events > ABS_MT_POSITION_X: 105
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 416
TRACE syngestures::events > ABS_MT_POSITION_X: 102
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 356
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 360
TRACE syngestures::events > ABS_MT_POSITION_X: 100
TRACE syngestures::events > ABS_MT_POSITION_Y: 375
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
TRACE syngestures::events > ABS_MT_POSITION_X: 99
TRACE syngestures::events > ABS_MT_POSITION_Y: 377
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > 2 finger remove (calculated)
DEBUG syngestures::events > Position ignored
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Distance: 13.92838827718412
TRACE syngestures::events > self.last_ts: 1677656128.511488
TRACE syngestures::events > self.last_gesture_time: 0
DEBUG syngestures::events > tap detected
DEBUG syngestures::events > ***RESET***
INFO syngestures > Tap { fingers: Two }
from syngesture.
Same case with swipe right (one finger):
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 6
TRACE syngestures::events > ABS_MT_TRACKING_ID: 10388
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 180
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 212
TRACE syngestures::events > ABS_MT_POSITION_X: -899
TRACE syngestures::events > ABS_MT_POSITION_Y: 167
DEBUG syngestures::events > Processing report with 6 events
INFO syngestures::events > Maximum slot count increased to 7
DEBUG syngestures::events > 2 finger press (calculated)
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 204
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 228
TRACE syngestures::events > ABS_MT_POSITION_Y: 165
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 240
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 256
TRACE syngestures::events > ABS_MT_ORIENTATION: -23
TRACE syngestures::events > ABS_MT_POSITION_X: -870
TRACE syngestures::events > ABS_MT_POSITION_Y: 161
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 256
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 276
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -839
TRACE syngestures::events > ABS_MT_POSITION_Y: 158
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 244
TRACE syngestures::events > ABS_MT_POSITION_X: -806
TRACE syngestures::events > ABS_MT_POSITION_Y: 149
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 12
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 228
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 274
TRACE syngestures::events > ABS_MT_POSITION_X: -771
TRACE syngestures::events > ABS_MT_POSITION_Y: 146
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 24
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 240
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 208
TRACE syngestures::events > ABS_MT_POSITION_X: -725
TRACE syngestures::events > ABS_MT_POSITION_Y: 138
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 36
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 288
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 300
TRACE syngestures::events > ABS_MT_POSITION_X: -664
TRACE syngestures::events > ABS_MT_POSITION_Y: 135
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 60
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 332
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 312
TRACE syngestures::events > ABS_MT_ORIENTATION: -4
TRACE syngestures::events > ABS_MT_POSITION_X: -548
TRACE syngestures::events > ABS_MT_POSITION_Y: 125
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 60
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 360
TRACE syngestures::events > ABS_MT_ORIENTATION: 1
TRACE syngestures::events > ABS_MT_POSITION_X: -453
TRACE syngestures::events > ABS_MT_POSITION_Y: 124
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 96
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 384
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 356
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: -263
TRACE syngestures::events > ABS_MT_POSITION_Y: 121
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 96
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 396
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 380
TRACE syngestures::events > ABS_MT_POSITION_X: -88
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 60
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 394
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 356
TRACE syngestures::events > ABS_MT_ORIENTATION: 5
TRACE syngestures::events > ABS_MT_POSITION_X: 23
TRACE syngestures::events > ABS_MT_POSITION_Y: 129
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 132
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 404
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 372
TRACE syngestures::events > ABS_MT_ORIENTATION: 7
TRACE syngestures::events > ABS_MT_POSITION_X: 251
TRACE syngestures::events > ABS_MT_POSITION_Y: 145
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 96
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 402
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 396
TRACE syngestures::events > ABS_MT_ORIENTATION: 0
TRACE syngestures::events > ABS_MT_POSITION_X: 429
TRACE syngestures::events > ABS_MT_POSITION_Y: 164
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL): 1
TRACE syngestures::events > <IGNORED> EV_REL(REL_HWHEEL_HI_RES): 84
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 420
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 320
TRACE syngestures::events > ABS_MT_ORIENTATION: 4
TRACE syngestures::events > ABS_MT_POSITION_X: 601
TRACE syngestures::events > ABS_MT_POSITION_Y: 192
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 408
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 144
TRACE syngestures::events > ABS_MT_ORIENTATION: 3
TRACE syngestures::events > ABS_MT_POSITION_X: 694
TRACE syngestures::events > ABS_MT_POSITION_Y: 218
DEBUG syngestures::events > Processing report with 5 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > 2 finger remove (calculated)
DEBUG syngestures::events > Position ignored
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Distance: 1593.8161750967392
TRACE syngestures::events > self.last_ts: 1677656271.099475
TRACE syngestures::events > self.last_gesture_time: 0
DEBUG syngestures::events > gesture detected
DEBUG syngestures::events > ***RESET***
INFO syngestures > Swipe { fingers: Two, direction: Right }
from syngesture.
Tap with 3 fingers detects as 4:
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TRACKING_ID: 10565
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 164
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 80
TRACE syngestures::events > ABS_MT_POSITION_X: -925
TRACE syngestures::events > ABS_MT_POSITION_Y: 115
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TRACKING_ID: 10566
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 172
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 344
TRACE syngestures::events > ABS_MT_POSITION_X: 180
TRACE syngestures::events > ABS_MT_POSITION_Y: -42
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TRACKING_ID: 10567
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 196
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 320
TRACE syngestures::events > ABS_MT_POSITION_X: 1266
TRACE syngestures::events > ABS_MT_POSITION_Y: 443
DEBUG syngestures::events > Processing report with 18 events
INFO syngestures::events > Maximum slot count increased to 6
INFO syngestures::events > Maximum slot count increased to 11
DEBUG syngestures::events > 4 finger press (calculated)
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 162
TRACE syngestures::events > ABS_MT_POSITION_X: -924
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 170
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 332
TRACE syngestures::events > ABS_MT_POSITION_Y: -41
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 318
DEBUG syngestures::events > Processing report with 9 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 159
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 78
TRACE syngestures::events > ABS_MT_POSITION_X: -923
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 167
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 330
TRACE syngestures::events > ABS_MT_POSITION_X: 179
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 194
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 315
DEBUG syngestures::events > Processing report with 11 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 77
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 166
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 329
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 314
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 163
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 312
TRACE syngestures::events > ABS_MT_POSITION_X: 178
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 311
TRACE syngestures::events > ABS_MT_POSITION_Y: 442
DEBUG syngestures::events > Processing report with 7 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 158
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 148
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 288
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 193
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 288
TRACE syngestures::events > ABS_MT_POSITION_Y: 440
DEBUG syngestures::events > Processing report with 9 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 136
TRACE syngestures::events > ABS_MT_POSITION_X: -920
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 132
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 216
TRACE syngestures::events > ABS_MT_POSITION_X: 175
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 176
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 252
TRACE syngestures::events > ABS_MT_POSITION_X: 1268
TRACE syngestures::events > ABS_MT_POSITION_Y: 437
DEBUG syngestures::events > Processing report with 12 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 108
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 88
TRACE syngestures::events > ABS_MT_POSITION_X: -907
TRACE syngestures::events > ABS_MT_POSITION_Y: 118
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 140
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 144
TRACE syngestures::events > ABS_MT_POSITION_X: 171
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 152
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 156
TRACE syngestures::events > ABS_MT_POSITION_X: 1279
TRACE syngestures::events > ABS_MT_POSITION_Y: 429
DEBUG syngestures::events > Processing report with 14 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
TRACE syngestures::events > ABS_MT_POSITION_X: 170
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
DEBUG syngestures::events > Processing report with 10 events
DEBUG syngestures::events > Remaining fingers: Some(Four)
TRACE syngestures::events > ABS_MT_SLOT: 2
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
TRACE syngestures::events > ABS_MT_SLOT: 5
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
TRACE syngestures::events > ABS_MT_SLOT: 10
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 6 events
DEBUG syngestures::events > 4 finger remove (calculated)
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Distance: 18.24828759089466
TRACE syngestures::events > self.last_ts: 1677656576.235524
TRACE syngestures::events > self.last_gesture_time: 0
DEBUG syngestures::events > tap detected
DEBUG syngestures::events > ***RESET***
INFO syngestures > Tap { fingers: Four }
from syngesture.
Can you update and try again? We initialize slot zero by default but the Magic Mouse events don't actually use slot zero for the gestures we're interested in meaning the tool count gets over-counted. It should be excluded now if it doesn't have any events associated with it.
from syngesture.
It sometimes detects one finger as one and often as two. Two fingers as two or three and so on.
$ cargo run --features logging
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/syngestures`
TRACE syngestures::events > ABS_MT_SLOT: 6
TRACE syngestures::events > ABS_MT_TRACKING_ID: 19095
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 364
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 440
TRACE syngestures::events > ABS_MT_POSITION_X: 22
TRACE syngestures::events > ABS_MT_POSITION_Y: 142
DEBUG syngestures::events > Processing report with 6 events
INFO syngestures::events > Maximum slot count increased to 7
DEBUG syngestures::events > 1 finger press (calculated)
DEBUG syngestures::events > Remaining fingers: Some(One)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 366
TRACE syngestures::events > ABS_MT_POSITION_Y: 139
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: Some(One)
TRACE syngestures::events > ABS_MT_POSITION_X: 25
TRACE syngestures::events > ABS_MT_POSITION_Y: 136
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > 2 finger press (calculated)
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 369
TRACE syngestures::events > ABS_MT_POSITION_Y: 135
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_POSITION_Y: 134
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 438
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 435
TRACE syngestures::events > ABS_MT_POSITION_Y: 136
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 360
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 431
TRACE syngestures::events > ABS_MT_POSITION_Y: 145
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 368
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 430
TRACE syngestures::events > ABS_MT_POSITION_Y: 148
DEBUG syngestures::events > Processing report with 3 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 328
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 429
TRACE syngestures::events > ABS_MT_POSITION_X: 28
TRACE syngestures::events > ABS_MT_POSITION_Y: 160
DEBUG syngestures::events > Processing report with 4 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TOUCH_MAJOR: 0
TRACE syngestures::events > ABS_MT_TOUCH_MINOR: 0
DEBUG syngestures::events > Processing report with 2 events
DEBUG syngestures::events > Remaining fingers: Some(Two)
TRACE syngestures::events > ABS_MT_TRACKING_ID: -1
DEBUG syngestures::events > Processing report with 1 events
DEBUG syngestures::events > 2 finger remove (calculated)
DEBUG syngestures::events > Position ignored
DEBUG syngestures::events > Remaining fingers: None
DEBUG syngestures::events > Distance: 24.186773244895647
TRACE syngestures::events > self.last_ts: 1677684321.967532
TRACE syngestures::events > self.last_gesture_time: 0
DEBUG syngestures::events > tap detected
DEBUG syngestures::events > ***RESET***
INFO syngestures > Tap { fingers: Two }
from syngesture.
It also detects taps multiple times when I just put my hand on the mouse and move it, without any other actions.
from syngesture.
The output you posted above is from actually doing what?
from syngesture.
That was a tap with one finger.
from syngesture.
I’ve been traveling out of town and will look at this more as soon as I get the chance.
from syngesture.
I believe I found what was causing the volatility in the detected number of fingers; it was an issue in how we set a temporary state for the first slot in case we're being used with a driver that doesn't report ABS_MT_SLOT_ID for single-tool contacts. Regular evdev drivers send a new ABS_MT_SLOT_ID event after every SYN_REPORT so the temporarily-assigned one isn't actually used, but the Magic Mouse driver doesn't and assumes the previous ABS_MT_SLOT_ID was persisted, even across SYN_REPORT events (so it was actually using the temporarily-assigned slot, meaning we calculated it as a gesture with two fingers rather than just one).
Can you update and try that scenario again?
I'm not sure if this does anything for "It also detects taps multiple times when I just put my hand on the mouse and move it," as that might be something different altogether and if that still happens then you'd need to provide the logging output for that scenario.
from syngesture.
@Lisio any updates?
from syngesture.
I've significantly rewritten portions of the logic to remove some assumptions about how a driver will emit its events and have confirmed it is working with some other cases where it wasn't before. I don't know about the magic mouse, as I don't have one (and the magic mouse workaround is still separate and required based off the events @Lisio provided in this thread), but there's a chance it's working.
I'll wait a few days to hear back but if I don't I'll close this issue out until someone with an Apple Magic Mouse can provide feedback.
from syngesture.
Related Issues (13)
- Remove evtest dependency HOT 10
- SUID bit documentation HOT 2
- How Hard Would It Be To Make Software That Works Like Mac TrackPad? HOT 8
- How to set the sticky bit on evtest HOT 2
- evtest: No such file or directory HOT 5
- Thank You HOT 2
- can't add permanent configuration HOT 2
- The value of device should be a stable path to your touchpad HOT 7
- evtest: No such file or directory HOT 13
- Lowering/changing sensitivity HOT 7
- /usr/local config HOT 2
- Finetune sensitivity and treshold HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syngesture.