chroxify / haptic

A new local-first, privacy-focused and open-source home for your markdown notes
https://haptic.md
GNU Affero General Public License v3.0
1.02k stars 21 forks source link

Some keyboard shortcuts for web interface don't work on Windows. #24

Open VeryColdAir opened 2 months ago

VeryColdAir commented 2 months ago

Describe your issue

When the web app loads, you see little shortcut suggestions popup briefly. These keyboard shortcuts do not seem to change based on the user's OS, but instead always say:

With Windows and Linux not having a command key, this can be a little confusing. Most of the time, people will assume to replace the command key with the control key. This is where the problem comes in. At least on Firefox and Edge, Ctrl + N opens a new window. This prevents the web app from being able to use Ctrl + N as a shortcut.

Similarly, on Firefox, Ctrl + Shift + N does create a new folder, but on Edge, Ctrl + Shift + N is used by the browser to open a new private window. Ctrl + O works on both Firefox and Edge as expected.

I would suggest using the Alt key instead of using the Ctrl key on Windows (and Linux). Looking at Mozilla's guide to keyboard shortcuts on Firefox, Alt seems like it should be a safe option instead of using Ctrl. On the keyboard shortcut guide for Edge, it looks like some commands do use Alt and a letter, but Alt + N, Alt + Shift + N, and Alt + O are available for the web app.

(With all this said, I think Ctrl + N will be fine for the Window's desktop app, even if it's not acceptable for the Web App on Windows.)

Steps to reproduce

There's (at least) two different browser behaviors, so I'll spell out both:

Firefox

  1. Go to the web app using Firefox on Windows (possibly also Linux, unsure).
  2. Notice the keyboard shortcut suggestion while they're previous on the screen.
  3. Try to use the keyboard shortcut (Command + N as Ctrl + N) to create a note.

Edge

  1. Go to the web app using Edge on Windows.
  2. Notice the keyboard shortcut suggestion while they're previous on the screen.
  3. Try to use the keyboard shortcut to create a note (Command + N as Ctrl + N).
  4. (Optional) Try to use the keyboard shortcut to create a new folder (Command + Shift + N as Ctrl + Shift + N).

What was the expected result?

The expected behavior has two parts:

Put here any screenshots or videos (optional)

No response

Would you like to work on this issue?

None