This commit is contained in:
localcc 2025-08-26 17:37:58 +03:00 committed by GitHub
commit 7b24d7c7b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1454,9 +1454,18 @@ fn is_virtual_key_pressed(vkey: VIRTUAL_KEY) -> bool {
#[inline]
pub(crate) fn current_modifiers() -> Modifiers {
let is_altgr = is_virtual_key_pressed(VK_RMENU) && is_virtual_key_pressed(VK_CONTROL);
Modifiers {
control: is_virtual_key_pressed(VK_CONTROL),
alt: is_virtual_key_pressed(VK_MENU),
control: if is_altgr {
false
} else {
is_virtual_key_pressed(VK_CONTROL)
},
alt: if is_altgr {
false
} else {
is_virtual_key_pressed(VK_MENU)
},
shift: is_virtual_key_pressed(VK_SHIFT),
platform: is_virtual_key_pressed(VK_LWIN) || is_virtual_key_pressed(VK_RWIN),
function: false,