usememos / memos

An open-source, lightweight note-taking solution. The pain-less way to create your meaningful notes. Your Notes, Your Way.
https://usememos.com
MIT License
34.14k stars 2.47k forks source link

Can we disable the markdown key mapping? #4022

Closed d0zingcat closed 4 weeks ago

d0zingcat commented 4 weeks ago

Describe the solution you'd like

I am a macOS/unix/linux user and I frequently use the unix-like keymapping day and night. But memos Editor register the keymap by default, e.g. Ctrl-B to generate a bolder syntax of markdown instead of moving cursor backforward. It's quite annoying.

Type of feature

User Interface (UI)

Additional context

I will try to submit an enhancement branch which includes:

  1. Settings/Memos: Add one option "Disable Shortcut"
  2. Persistent 1. option into database(and do the db migration)
  3. In web editor, read the options, if there's the disable config, then don't register the markdown keydown handler.
johnnyjoygh commented 4 weeks ago

@d0zingcat You can put the setting into the workspace memo settings, and I think the name should be something like enable editor shortcuts, with the default set to false.

Reference to https://github.com/usememos/memos/pull/3989

RoccoSmit commented 4 weeks ago

Can the default be set as true (shortcut keys are in use).

With the default set to true users will be none the wiser of the change and their user experience won't be affected and those who want the change can toggle the setting.

If the default is set to false the are going to be users who use to have a feature that is going to be missing after upgrading and I'd imagine GitHub issues will follow.

johnnyjoygh commented 4 weeks ago

@RoccoSmit But I don't think it's worth creating an SQL query to backfill data just for a setting. A simpler way would be to mention this issue in the release note.

RoccoSmit commented 4 weeks ago

Fair point, my line of thinking is "how many users do/don't want shortcuts" (I for one like using ctrl + enter to quick save) and which is the bigger group being negatively impacted by removing the feature vs giving the ability to remove the feature

d0zingcat commented 4 weeks ago

I share the same thoughts with @RoccoSmit as I think there maybe more users who is using the shortcuts more than those don't. A better way is to keep things as they were and add a new choice to change, namely like I've commented, maybe the name should be like "Disable editor shortcut" with the default set to "false", just like the "Disable public memos " option.