A chat server with OAuth2 authentication, persistent and searchable history, video and audio, markdown formatting, private and public rooms, stars, votes, embedded games, and many other features
This PR make sure for any Ctrl + event that Miaou process that the "AltGr(aph)" key is not pressed.
This is because on windows when the AltGr key is pressed Windows is also sending a Ctrl event.
Thus we end up with some keyboard event which have altKey and ctrlKey set to true, while in fact only the AltGr key is pressed.
In some keyboard configuration it will conflict with Miaou shortcuts.
Examples of conflict on a bépo keymap:
AltGr+b should give a | (pipe) but Miaou interpret it as a Ctrl+b which mean «put in bold» an thus prevent the | to be printed in the chat.
AltGr+i which is the dead key for ¨ (diaeresis) is for Miaou «put in italic», however this is less an issue because the ¨ is still printed at next character press; but it is still impairing.
Solution used: simply make sure that the keypress event has not Ctrl AND Alt has modifiers.
This solution was chosen for multiples reason:
When pressing on AltGr on Windows, it will always result in sending a Ctrl and an Alt Keypress event. however we could determine if AltGr was pressed by looking at the «location» of the Keypress
However when we are interested in a combination of key pressed we lose the location information.
It was quite simple and do not change a lot how Miaou work
This PR make sure for any Ctrl + event that Miaou process that the "AltGr(aph)" key is not pressed. This is because on windows when the AltGr key is pressed Windows is also sending a Ctrl event. Thus we end up with some keyboard event which have altKey and ctrlKey set to true, while in fact only the AltGr key is pressed. In some keyboard configuration it will conflict with Miaou shortcuts. Examples of conflict on a bépo keymap:
Solution used: simply make sure that the keypress event has not Ctrl AND Alt has modifiers. This solution was chosen for multiples reason: