enigo
enigo copied to clipboard
Fix a panic bug on key event on Windows.
Hi.
Fixed following issue. https://github.com/enigo-rs/enigo/issues/121
The policy of the fix was to follow the README of winapi-rs.
How do I create an instance of a union?
Use
std::mem::zeroed()
to create an instance of the union, and then assign the value you want using one of the variant methods.