You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread 'main' panicked at 'cannot transmute_copy if U is larger than T', /rustc/f6f9d5e73d5524b6281c10a5c89b7db35c330634\library\core\src\mem\mod.rs:1057:5
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/f6f9d5e73d5524b6281c10a5c89b7db35c330634/library\std\src\panicking.rs:584
1: core::panicking::panic_fmt
at /rustc/f6f9d5e73d5524b6281c10a5c89b7db35c330634/library\core\src\panicking.rs:142
2: core::mem::transmute_copy<winapi::um::winuser::KEYBDINPUT,winapi::um::winuser::INPUT_u>
at /rustc/f6f9d5e73d5524b6281c10a5c89b7db35c330634\library\core\src\mem\mod.rs:1057
3: enigo::win::win_impl::keybd_event
at .\src\win\win_impl.rs:36
4: enigo::win::win_impl::impl$1::key_down
at .\src\win\win_impl.rs:138
5: key::main
at .\examples\key.rs:9
6: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
at /rustc/f6f9d5e73d5524b6281c10a5c89b7db35c330634\library\core\src\ops\function.rs:248
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `target\debug\examples\key.exe` (exit code: 101)
To Reproduce
Use rustc 1.64.0-nightly and run cargo run --example key.
Expected behavior
Expects a input, but in fact panic occurs.
Environment (please complete the following information):
OS: Windows
Rust: rustc 1.64.0-nightly (f6f9d5e73 2022-08-04)
Library Version: enigo 0.0.14
The text was updated successfully, but these errors were encountered:
Describe the bug
On windows, functions that use
fn keybd_event(flags: u32, vk: u16, scan: u16)
internally cause panic when used in Rust 1.64.0 or later.See also the following issue.
rust-lang/rust#100545
To Reproduce
Use rustc 1.64.0-nightly and run
cargo run --example key.
Expected behavior
Expects
a
input, but in fact panic occurs.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: