Open LiekeVanmulken opened 5 years ago
It looks like that when you hold down <ctrl> + <alt> + i
for a solid second it will trigger the inspector.
This actually seems to be an issue with windows turning ctrl + alt
into AltGr
which you can read about here. I tested it and when you press ctrl+alt
it recognizes that both are pressed but the moment you press the i
it thinks that the ctrl
and alt
key are no longer pressed. When you hold it longer it will eventually recognize that both are pressed and will trigger.
The following code was used to check the keydown:
<html>
<head>
<script>
function handler(e) {
var key = window.event ? e.keyCode : e.which;
console.log(key, e.altKey, e.ctrlKey);
//Shortcut code from aframe src\components\scene\inspector.js line 62
var shortcutPressed = e.keyCode === 73 && e.ctrlKey && e.altKey;
console.log(shortcutPressed);
}
// attach handler to the keydown event of the document
if (document.attachEvent) document.attachEvent('onkeydown', handler);
else document.addEventListener('keydown', handler);
</script>
</head>
<body>
AltGr testing
</body>
</html>
^This doesn´t seem to fix the problem entirely, for some reason it only registers it the first time.
Thanks for investigating
Description: The keyboard shortcut for the inspector does not work on the United States-international keyboard layout.
This is the default code from the introduction in the docs
It looks like when i use an English keyboard layout (United States international keyboard layout),
<ctrl> + <alt> + i
it will produce the following character (gotten from keyboardtester): íThis then prevents the inspector from opening. This is solved when using a different keyboard layout, using the Dutch keyboard layout fixes the problem.