Merge ecdf560dff
into 858ab9cc23
This commit is contained in:
commit
7b24d7c7b6
1 changed files with 11 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue