From 59842657f00064035f7eeb1d43a72c0a2ba1a27a Mon Sep 17 00:00:00 2001 From: Vitor Mateus De Almeida Date: Tue, 27 Apr 2021 17:28:59 -0300 Subject: [PATCH] Implement debug window shortcut for Mac OS --- .../imports/ui/components/debug-window/component.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/debug-window/component.jsx b/bigbluebutton-html5/imports/ui/components/debug-window/component.jsx index 66dd787426..2b1aada244 100644 --- a/bigbluebutton-html5/imports/ui/components/debug-window/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/debug-window/component.jsx @@ -56,8 +56,10 @@ class DebugWindow extends Component { componentDidMount() { document.addEventListener('keyup', (event) => { - const key = event.key.toUpperCase(); - if (DEBUG_WINDOW_ENABLED && event.altKey && key === SHOW_DEBUG_WINDOW_ACCESSKEY) { + const { key, code } = event; + const eventKey = key.toUpperCase(); + const eventCode = code; + if (DEBUG_WINDOW_ENABLED && event.altKey && (eventKey === SHOW_DEBUG_WINDOW_ACCESSKEY || eventCode === `Key${SHOW_DEBUG_WINDOW_ACCESSKEY}`)) { this.debugWindowToggle(); } });