PuzzleScript icon indicating copy to clipboard operation
PuzzleScript copied to clipboard

Keyboard shortcut for commenting does not work on Safari mac and Firefox mac

Open ClementSparrow opened this issue 3 years ago • 5 comments

in Safari it is used for showing/hiding the status bar. In Firefox it triggers the search in menus that is now standard in MacOS apps.

ClementSparrow avatar Aug 09 '21 15:08 ClementSparrow

Question to future increpare when he's on macOS: Is this the case for both ctrl+/ and cmd+/? If one doesn't work the other might.

increpare avatar Aug 11 '21 21:08 increpare

@ClementSparrow ok my macbook keyboard is janky and I can't check because my '/' key doesn't work (I tried an external keyboard, but osx messed up the keymapping). Could you (or someone else) confirm that neither ctrl+/ nor cmd+/ work in those browsers for you?

increpare avatar Aug 13 '21 17:08 increpare

@ClementSparrow ok my macbook keyboard is janky and I can't check because my '/' key doesn't work (I tried an external keyboard, but osx messed up the keymapping). Could you (or someone else) confirm that neither ctrl+/ nor cmd+/ work in those browsers for you?

I can confirm it. But also, I'm using a French keyboard (azerty), which means the / requires an additional SHIFT. I doubt it changes anything though (except that changing Ctrl+/ in Ctrl+Shift+/ is not an option ;-) ).

ClementSparrow avatar Aug 14 '21 22:08 ClementSparrow

Ctrl+/ (but not Ctrl+Shift+/) works for me on both Safari and Firefox using a U.S. keyboard input mode. However, if I switch my input mode to French, it does not work on either browser, with (or without) shift. The trouble appears to be that the input is programmatically represented (for the French keyboard) literally as 'Ctrl+Shift+:', not as 'Ctrl+/' (likewise for Ctrl+Shift+anything, really). So it appears that the solution would be to also detect Ctrl+Shift+:.

BentSm avatar Feb 04 '22 00:02 BentSm

Things get more complicated... Firefox uses 58 as the key code for ':' (== ASCII value of ':') on a French keyboard layout, which CodeMirror does not recognize (and thus ignores). Safari, on the other hand, uses key code 186 (presumably == 58+128?) for ':' on a French keyboard, which CodeMirror identifies as ';'. (The key codes are on Mac; I don't know what other OSes do.)

BentSm avatar Feb 04 '22 03:02 BentSm