Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputBox crashes #59

Open
Neutron3529 opened this issue Jun 5, 2022 · 0 comments
Open

InputBox crashes #59

Neutron3529 opened this issue Jun 5, 2022 · 0 comments

Comments

@Neutron3529
Copy link

RUST_BACKTRACE=full sudo --preserve-env=RUST_BACKTRACE target/debug/Clicker
thread 'main' panicked at 'libinput returned invalid 'libinput_event_type'', /home/.../input-0.6.0/src/event.rs:108:18

This error is generated when I scroll my mouse, it seems that there is a bug in input-0.6.0, I update input to 0.7.1 and the bug solved.

(I also edited line 201 of mod.rs to make rustc happy.)

let keyboard_key_event = if let KeyboardEvent::Key(keyboard_key_event) = keyboard_event { keyboard_key_event } else { todo!() };

besides, there are 6 warnings after update:

warning: unreachable pattern
   --> inputbot-0.5.1/src/linux/inputs.rs:180:9
    |
180 |         0x52 => Some(Numpad0Key),
    |         ^^^^
    |
    = note: `#[warn(unreachable_patterns)]` on by default

warning: unreachable pattern
   --> inputbot-0.5.1/src/linux/inputs.rs:182:9
    |
182 |         0x50 => Some(Numpad2Key),
    |         ^^^^

warning: unreachable pattern
   --> inputbot-0.5.1/src/linux/inputs.rs:184:9
    |
184 |         0x4b => Some(Numpad4Key),
    |         ^^^^

warning: unreachable pattern
   --> inputbot-0.5.1/src/linux/inputs.rs:186:9
    |
186 |         0x4d => Some(Numpad6Key),
    |         ^^^^

warning: unreachable pattern
   --> inputbot-0.5.1/src/linux/inputs.rs:187:9
    |
187 |         0x47 => Some(Numpad7Key),
    |         ^^^^

warning: unreachable pattern
   --> inputbot-0.5.1/src/linux/inputs.rs:188:9
    |
188 |         0x48 => Some(Numpad8Key),
    |         ^^^^

warning: `inputbot` (lib) generated 6 warnings

I have no idea of those code, since they do not bother my program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant