Merge pull request #12180 from vitormateusalmeida/debug-window
Implement debug window shortcut for Mac OS
This commit is contained in:
commit
c0cac61fa0
@ -56,8 +56,10 @@ class DebugWindow extends Component {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
document.addEventListener('keyup', (event) => {
|
document.addEventListener('keyup', (event) => {
|
||||||
const key = event.key.toUpperCase();
|
const { key, code } = event;
|
||||||
if (DEBUG_WINDOW_ENABLED && event.altKey && key === SHOW_DEBUG_WINDOW_ACCESSKEY) {
|
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();
|
this.debugWindowToggle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user