Skip to content

Commit 5c3b40b

Browse files
committed
Merge branch 'develop' of https://github.com/processing/p5.js-web-editor into dewanshmobile/ide
2 parents 47db20a + 2eb8690 commit 5c3b40b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

client/modules/IDE/hooks/useKeyDownHandlers.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ export default function useKeyDownHandlers(keyHandlers) {
3232
const isMac = navigator.userAgent.toLowerCase().indexOf('mac') !== -1;
3333
const isCtrl = isMac ? e.metaKey : e.ctrlKey;
3434
if (e.shiftKey && isCtrl) {
35-
handlers.current[`ctrl-shift-${e.key?.toLowerCase()}`]?.(e);
36-
}
37-
if (isCtrl) {
38-
handlers.current[`ctrl-${e.key?.toLowerCase()}`]?.(e);
35+
handlers.current[`ctrl-shift-${e.key.toLowerCase()}`]?.(e);
36+
} else if (isCtrl) {
37+
handlers.current[`ctrl-${e.key.toLowerCase()}`]?.(e);
3938
}
4039
handlers.current[e.key?.toLowerCase()]?.(e);
4140
}, []);

0 commit comments

Comments
 (0)