mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-08 21:34:38 +00:00
Drop support for legacy Edge
This commit is contained in:
@@ -170,9 +170,7 @@ export default class Keyboard {
|
||||
|
||||
// If this is a legacy browser then we'll need to wait for
|
||||
// a keypress event as well
|
||||
// (Edge has a broken KeyboardEvent.key, so we can't
|
||||
// just check for the presence of that field)
|
||||
if (!keysym && (!e.key || browser.isEdge())) {
|
||||
if (!keysym && !e.key) {
|
||||
this._pendingKey = code;
|
||||
// However we might not get a keypress event if the key
|
||||
// is non-printable, which needs some special fallback
|
||||
|
||||
@@ -110,18 +110,7 @@ export function getKey(evt) {
|
||||
return 'Delete';
|
||||
}
|
||||
|
||||
// Edge need special handling, but for everyone else we
|
||||
// can trust the value provided
|
||||
if (!browser.isEdge()) {
|
||||
return evt.key;
|
||||
}
|
||||
|
||||
// Edge has broken handling of AltGraph so we can only
|
||||
// trust it for non-printable characters (and unfortunately
|
||||
// is also specifies 'Unidentified' for some problem keys)
|
||||
if ((evt.key.length !== 1) && (evt.key !== 'Unidentified')) {
|
||||
return evt.key;
|
||||
}
|
||||
return evt.key;
|
||||
}
|
||||
|
||||
// Try to deduce it based on the physical key
|
||||
|
||||
Reference in New Issue
Block a user