aframe-inspector icon indicating copy to clipboard operation
aframe-inspector copied to clipboard

Wrong keyboard shortcut for MacOS

Open mattrossman opened this issue 4 years ago • 4 comments

The documented shortcut of Ctrl+Alt+I (which could be interpreted as Ctrl+Option+I or Cmd+Option+I) does not work on MacOS, tested on Firefox and Chrome. I thought that the inspector was simply broken. I found out on StackOverflow that instead, the shortcut for MacOS is Shift+Ctrl+Option+I.

~~I don't know if the "issue" is the shortcut implementation or lack of documentation, but either way it's mind boggling that this basic operation has not been documented for the MacOS community.~~ Editing this to be less sassy 😅

mattrossman avatar May 25 '20 19:05 mattrossman

Bumping this to note that Shift+Option+I now seems to be sufficient, but it still needs to be documented.

mattrossman avatar Mar 16 '21 23:03 mattrossman

PRs always appreciated https://github.com/aframevr/aframe/blob/master/docs/introduction/visual-inspector-and-dev-tools.md

dmarcos avatar Mar 16 '21 23:03 dmarcos

@dmarcos Is there a reason for having a separate shortcut on MacOS? I notice the shortcut is mentioned in several places in the docs -- rather than mentioning the alternate shortcut every time, maybe we can fix the shortcut to be the same across platforms?

mattrossman avatar Mar 17 '21 00:03 mattrossman

The shortcut should be the same in both platforms. The equivalent of the alt key on the mac is the option key. Shortcut should be:

  • Windows: Ctrl + Alt + i
  • Mac: Ctrl + Option + i

Unless the Mac shortcut is taken for something else.

The idea of the inspector is to be the 3D equivalent of the DOM inspector that opens with Ctrl + Shift + i

Logic is in A-Frame not in the inspector repo.

dmarcos avatar Mar 17 '21 00:03 dmarcos

ctl + option + i has opened a-frame inspector on mac os for the last decade, @dmarcos can you close this?

kfarr avatar Jan 25 '23 00:01 kfarr

I gotchu. I actually still face this issue but it's not A-Frame's fault.

Unless the Mac shortcut is taken for something

This was the cause for me. It seems Ctrl + Option + i is a shortcut used by a couple other popular Mac applications. I don't recall which app was causing the conflict originally, but there wasn't any visual feedback so it appeared to be doing nothing. More recently I experience the conflict with the default keybinds for Rectangle, but that one is easier to notice since it causes a window snap.

Interestingly, I only need to press Option + i on Mac to summon the inspector. The line Diego shared above will ignore the evt.ctrlKey check as long as evt.getModifierState('AltGraph') is satisfied, which on Mac happens when Option is pressed (reference).

mattrossman avatar Jan 25 '23 01:01 mattrossman

@mattrossman thanks for the writeup, sorry I came off as rude in my request to close, I was going through a bunch of old tickets that were very similar. Appreciate the context and helpful to know about traps like this when helping users open the inspector.

kfarr avatar Jan 25 '23 06:01 kfarr