Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/scene/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports.Component = registerComponent('inspector', {
* <ctrl> + <alt> + i keyboard shortcut.
*/
onKeydown: function (evt) {
var shortcutPressed = evt.keyCode === 73 && evt.ctrlKey && evt.altKey;
var shortcutPressed = evt.keyCode === 73 && (evt.ctrlKey && evt.altKey || evt.getModifierState('AltGraph'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I see. There doesn't seem to be another way to detect ctrl + alt on an US international keyboard. Some sources report that crtlKey and altKey should both be true but that doesn't seem to be the case on both Firefox and Chrome.

The only other solution I can think of right now is to use evt.key === 'í', as í is the key returned when pressing ctrl + alt + i on a US international keyboard. This, however, seems quite layout dependent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link has been updated and AltGraph no longer seems deprecated as far as I can see.

if (!shortcutPressed) { return; }
this.openInspector();
},
Expand Down