diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index d00863d70559b..e7dbf59bd5527 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -1018,8 +1018,7 @@ class WidgetAnnotationElement extends AnnotationElement { } _getKeyModifier(event) { - const { isWin, isMac } = FeatureTest.platform; - return (isWin && event.ctrlKey) || (isMac && event.metaKey); + return FeatureTest.platform.isMac ? event.metaKey : event.ctrlKey; } _setEventListener(element, elementData, baseName, eventName, valueGetter) { diff --git a/src/shared/util.js b/src/shared/util.js index 9bd726e9adccf..ed1ec6886265b 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -619,10 +619,9 @@ class FeatureTest { (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) && typeof navigator === "undefined" ) { - return shadow(this, "platform", { isWin: false, isMac: false }); + return shadow(this, "platform", { isMac: false }); } return shadow(this, "platform", { - isWin: navigator.platform.includes("Win"), isMac: navigator.platform.includes("Mac"), }); }