monkeytype icon indicating copy to clipboard operation
monkeytype copied to clipboard

Linux key modifier not recognized on tip text

Open pasanflo opened this issue 11 months ago • 2 comments

Did you clear cache before opening an issue?

  • [X] I have cleared my cache

Is there an existing issue for this?

  • [X] I have searched the existing issues

Does the issue happen when logged in?

Yes

Does the issue happen when logged out?

Yes

Does the issue happen in incognito mode when logged in?

Yes

Does the issue happen in incognito mode when logged out?

Yes

Account name

pasanflo

Account config

{ "theme": "sonokai", "themeLight": "serika", "themeDark": "serika_dark", "autoSwitchTheme": false, "customTheme": false, "customThemeColors": [ "#323437", "#e2b714", "#e2b714", "#646669", "#2c2e31", "#d1d0c5", "#ca4754", "#7e2a33", "#ca4754", "#7e2a33" ], "favThemes": ["sonokai", "cheesecake", "moonlight", "vscode"], "showKeyTips": true, "showLiveWpm": false, "showTimerProgress": true, "smoothCaret": "fast", "quickRestart": "esc", "punctuation": false, "numbers": false, "words": 1, "time": 30, "mode": "custom", "quoteLength": [1], "language": "spanish", "fontSize": 2, "freedomMode": false, "difficulty": "normal", "blindMode": false, "quickEnd": false, "caretStyle": "default", "paceCaretStyle": "default", "flipTestColors": false, "layout": "default", "funbox": "none", "confidenceMode": "off", "indicateTypos": "off", "timerStyle": "bar", "colorfulMode": true, "randomTheme": "off", "timerColor": "main", "timerOpacity": "1", "stopOnError": "off", "showAllLines": false, "keymapMode": "off", "keymapStyle": "staggered", "keymapLegendStyle": "lowercase", "keymapLayout": "qwerty", "keymapShowTopRow": "layout", "fontFamily": "JetBrains_Mono", "smoothLineScroll": true, "alwaysShowDecimalPlaces": true, "alwaysShowWordsHistory": false, "singleListCommandLine": "manual", "capsLockWarning": true, "playSoundOnError": "2", "playSoundOnClick": "off", "soundVolume": "0.5", "startGraphsAtZero": true, "showOutOfFocusWarning": true, "paceCaret": "off", "paceCaretCustomSpeed": 100, "repeatedPace": true, "pageWidth": "100", "accountChart": ["on", "on", "on", "on"], "minWpm": "off", "minWpmCustomSpeed": 100, "highlightMode": "letter", "typingSpeedUnit": "wpm", "ads": "result", "hideExtraLetters": false, "strictSpace": false, "minAcc": "off", "minAccCustom": 90, "showLiveAcc": false, "showLiveBurst": false, "monkey": false, "repeatQuotes": "off", "oppositeShiftMode": "off", "customBackground": "", "customBackgroundSize": "cover", "customBackgroundFilter": [0, 1, 1, 1, 1], "customLayoutfluid": "qwerty#dvorak#colemak", "monkeyPowerLevel": "off", "minBurst": "off", "minBurstCustomSpeed": 100, "burstHeatmap": false, "britishEnglish": true, "lazyMode": false, "showAverage": "off", "tapeMode": "off" }

Current Behavior

The hint text on the settings page doesn't recognize I'm a Linux user and shows me a shortcut that is not working. It is showing me the Windows shortcut (With Ctrl) and it doesn't work on Firefox Linux.

This is because of how the modifier key is being checked (Link to the checker)

Expected Behavior

For Linux users on Gecko-based browsers, the correct tipped shortcut should be Super+Shift+P

For Linux users on Chromium-based browsers, the tipped shortcut should be typed Ctrl/Super+Shift+P, since it works both ways.

Steps To Reproduce

  1. On a Gecko-based web browser (Firefox, e.g.) go to https://monkeytype.com/settings

  2. It is shown that you can access to the settings by typing Ctrl+Shift+P image

  3. Type Ctrl+Shift+P

  4. Nothing happens. (It happens when you do Super+Shift+P)

Environment

  • OS: Manjaro Linux 23.1.3
  • Browser: Mozilla Firefox
  • Browser Version: 123.0.1 (64-bit)

Anything else?

I was checking on how they do it on different typescript-based projects so I can fix it myself, this is how Visual Studio Code does it just in case someone finds it useful:

https://github.com/microsoft/vscode/blob/7674d5634504300a295f0b177c3dd54053680181/src/vs/base/common/platform.ts

pasanflo avatar Mar 15 '24 15:03 pasanflo

ctrl+shift+p opens private window in firefox on linux and windows. super-shift-p is already assigned to another action on windows.

Maybe we can use a unused shortcut in firefox like ctrl+shift+n or ctrl+shift+space

fehmer avatar Mar 15 '24 18:03 fehmer

I think adding different shortcuts depending on browser could be misleading to some users that use different browsers. May I suggest overriding the native Ctrl/Cmd+K as is widely used over the internet to show this kind of command line tool on the web? (It overrides the native web search)

Examples on websites using this shortcut in similar command lines:

Vue docs - React docs - MDN web docs

Other option could be using Tab and deleting the shortcut shown on the tip that its not working.

I'll be using Tab from now.

Please let me know what you think.

pasanflo avatar Mar 16 '24 14:03 pasanflo