fix(shells): report the Super keys to pages as Meta

winit names the Super keys NamedKey::Super, which the key conversion did
not map, so pages saw an Unidentified key. The DOM names these keys
Meta.
This commit is contained in:
Marco Allegretti 2026-10-09 20:21:26 +00:00
parent 72dda72432
commit 73dc2cbaa5
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -57,7 +57,8 @@ fn named_key(n: NamedKey) -> servo::NamedKey {
NamedKey::Control => S::Control,
NamedKey::Fn => S::Fn,
NamedKey::FnLock => S::FnLock,
NamedKey::Meta => S::Meta,
// winit names the Super keys Super; the DOM names them Meta.
NamedKey::Meta | NamedKey::Super => S::Meta,
NamedKey::NumLock => S::NumLock,
NamedKey::ScrollLock => S::ScrollLock,
NamedKey::Shift => S::Shift,

View file

@ -57,7 +57,8 @@ fn named_key(n: NamedKey) -> servo::NamedKey {
NamedKey::Control => S::Control,
NamedKey::Fn => S::Fn,
NamedKey::FnLock => S::FnLock,
NamedKey::Meta => S::Meta,
// winit names the Super keys Super; the DOM names them Meta.
NamedKey::Meta | NamedKey::Super => S::Meta,
NamedKey::NumLock => S::NumLock,
NamedKey::ScrollLock => S::ScrollLock,
NamedKey::Shift => S::Shift,