Closed Fishrock123 closed 10 years ago
More important is changing the cmd modifier symbol in the menus to say "ctrl".
I would do this with a pseudo-element, eg give the body a class that specifies what OS the use is on and that class determines the content of the cmd/ctrl modifier. Make sense?
I wouldn't consider that more important; most important is that it now works for windows, even if slightly hacky. (The entire unless ~
thing can get pretty weird to visualize)
I'm pretty sure most windows people would naturally try to use ctrl
with these hotkeys.
That does make sense though. Not 100% sure how I'd do it with CSS off the top of my head, but I'll have a jab at it.
No, sorry. I didn't mean that. I meant it's more important than the style question of if not
over if !
. Of course it has to work before we change the icons in the menu.
This looks great though. I wouldn't call it hacky. Great job. I'll test this out tonight.
Have you been able to test this on a Windows machine? I have none at my disposal and it doesn't seem to work when I test it in Windows on Browserstack, but it might be a problem with Browserstack.
I did test it on Windows 8.
I'll host this revision on my site later and make sure it works for the OP.
Edit: (I would do this now but npm is crapping out on me.)
Protip: do not rely on MouseEvent.metaKey
.
New commits confirmed working in Windows 8 & in OS X.
@artursapek LGTY?
I deployed this to staging and I'll test it on a Windows machine while I'm at work tomorrow.
@artursapek Were the latest commits deployed to staging?
@artursapek I know you have mainly moved on to other things, but do you think this could be pulled?
Deployed. Can you verify?
Works for me. (Windows 8, Chrome)
Great!
Perhaps this should be the default, and the conditional should be to use cmd
for OSX only? Currently shortcuts don't work for me on GNU/Linux.
Fixes #1.