Treat meta key same as ctrl (#12051)

This commit is contained in:
Nicolas Mowen 2024-06-18 19:26:00 -06:00 committed by GitHub
parent e6790d9a6a
commit 767033e4d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,11 @@ export default function useKeyboardListener(
if (keys.includes(e.key)) {
e.preventDefault();
listener(e.key, { down: true, repeat: e.repeat, ctrl: e.ctrlKey });
listener(e.key, {
down: true,
repeat: e.repeat,
ctrl: e.ctrlKey || e.metaKey,
});
}
},
[keys, listener],