KeyCastOW icon indicating copy to clipboard operation
KeyCastOW copied to clipboard

Support keyboards with AltGr

Open dbratell opened this issue 5 years ago • 0 comments

Any keys with AltGr would be shown as ctrl+alt+key, so instead of seeing "{" when pressing AltGr+7 on a Swedish keyboard you would see Ctrl+Alt+7, and instead of € you would see Ctrl+Alt+e.

With this patch AltGr is treated just as Shift. So when Shift is shown, so is AltGr, and the other way around.

Since there is no single virtual key representing AltGr, this changes the representation of modifiers from a string and sometimes a vk, to a struct of 5 bools. This makes the code simpler and should be as efficient.

The patch also changes some constants from magical numerical values to VK_FOO constants.

Otherwise the patch tries to stay as close as possible to the existing code style for good and bad. It will us fixed size buffers for instance.

dbratell avatar Oct 02 '19 15:10 dbratell