winput
winput copied to clipboard
A high-level interface to Windows' input system.
Two functions are added to `Vk`: `is_valid`, that determines wheter a given `u8` value is safe to convert to `Vk` enum, and `from_u8_safe` that converts an `u8` to an `Option`....
I suggest adding a safe way to convert an `u8` value to a `Vk`, by being able to verify if a given `u8` value corresponds to a virtual key, i.e.,...
This is a pull request addressing #9: `Vk` enum gets a `is_extended` method which returns `true` if a given key is extended, and `from_vk` sets the `KEYEVENTF_EXTENDEDKEY` for keyboard input.
Some keys are considered [extended](https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#extended-key-flag), and when using `winuser::SendInput` the `KEYEVENTF_EXTENDEDKEY` should be set. If this is not done, the may not be properly interpreted by the recipients. Most notably,...
program will panic when the string to be sent contains emoji(>0x0000ffff). now fixed 😊