Console: forbid Ctrl Alt shortcuts
DP shouldn't define any Ctrl+Alt shortcut since on Windows they are used to type some characters in certain non-English keyboards. For example in my Italian keyboard (where the AltGr key simply emulates Ctrl Alt
):
key | shortcut | alt. shortcut |
---|---|---|
] | AltGr + |
Ctrl Alt + |
} | AltGr Shift + |
Ctrl Alt Shift + |
Even though apparently no shortcut of the console makes use of Ctrl Alt
, this is an issue because the console doesn't check all the modifier keys for many shortcuts.
For example the shortcut Ctrl v
to past text to the console doesn't check if Shift
and Alt
are disabled, thus you can past text even with Ctrl Shift v
, Ctrl Shift Alt v
and Ctrl Alt v
. If you have the AltGr
key you can combine them with it too.
So basically this patch fixes not being able to type } with AltGr +
and ] and AltGr Shift +
, which accidentally trigger the shortcut to increase the console font Ctrl +
instead. (issue #232 (closed))
EDIT 2: Also this patch doesn't allow executing console shortcuts if the unnecessary key modifiers are pressed, e.g. it doesn't allow ctrl-shift-v to work as ctrl-v
From https://en.wikipedia.org/wiki/AltGr_key
Ctrl+Alt ≈ AltGr
Therefore, it is recommended that this combination not be used as a modifier in Windows keyboard shortcuts as, depending on the keyboard layout and configuration, someone trying to type a special character with it may accidentally trigger the shortcut,[5] or the keypresses for the shortcut may be inadvertently interpreted as the user trying to input a special character.
EDIT 1: entirely rewritten to be clearer