Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt key commands on mac #38

Open
ethansilvas opened this issue Apr 26, 2018 · 2 comments
Open

Alt key commands on mac #38

ethansilvas opened this issue Apr 26, 2018 · 2 comments

Comments

@ethansilvas
Copy link

For some reason, when I try to use the alt key commands on mac they never work, even though my alt key works doing anything else. All of the commands that read "Ctrl/Alt" work if I use the control key, but never if I use the alt key. On my pc I don't have this issue, and I'm using chrome on both computers. Even when I tried plugging in a separate pc-layout keyboard into my mac, the commands still couldn't be read. Any reason this could be?

@mr21
Copy link
Member

mr21 commented Apr 26, 2018

Hi :) thanks for your issue

Initially there are ctrl and alt because sometime it is not possible to overwrite the a Ctrl shortcut like ctrl+N for example. But I don't remember about Mac's keyboard (im on PC).
Currently I have no time anyway :/

@joshnatis
Copy link

Hi, just dropping in to say I'm still experiencing this behavior. Of course this is not at all an urgent issue, and I don't mean for this comment to be construed that way.

I think the code in /src/ui/keyboard.js may be responsible for this, specifically the function UIkeyboardShortcuts.

function UIkeyboardShortcuts( e ) {
	return UIkeyboardFns.some( ( [ ctrlOrAlt, alt, key, fn ] ) => {
		if ( ( key === e.key ) &&
			( !alt || e.altKey ) &&
			( ctrlOrAlt === ( e.ctrlKey || e.altKey ) )
		) {
			fn();
			e.preventDefault();
			return true;
		}
	} );
}

Just to mention (may this be hinting at the problem somehow?), CTRL + Left-Click should equate to a Right-Click (it does in other tabs/windows), but this is not so in gridsound (it's just treated as Left-Click, as if CTRL's default behavior is prevented).

Cool project, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants