[Consolidation] redefining shortcuts handled by Codemirror

Some Keyboard shortcuts are used by codemirror.
When the user binds these shortcuts to some other function, things can get weird (often a concatenation of effects).

References:

7 Likes

I have this same issue.

So, does this mean this bug was this already addressed? Or is it in the process of being addressed?

It will be addressed at some point.

1 Like

Steps to reproduce

  1. Create a new note in edit mode
  2. Add text to note
  3. Navigate to a different note
  4. Return to new note
  5. Delete using hotkey ctrl+delete

Expected result

Pane is empty and note should be deleted.

Actual result

Pane is empty, but note is not deleted. Text in note is deleted.

Environment

  • Operating system: Windows 10
  • Obsidian version: 0.8.2

Additional information

  • I am using Obsidian trash.
  • I am creating new notes in one specified folder.
  • This bug only happens under specific conditions:
    • Keep the note in the folder it was created. If I move the note, this does not occur.
    • In edit mode
    • Must add text to newly created note
    • Must use hotkey
2 Likes

:+1:
Same is happening for me (I even used same keyboard shortcut as mentioned in the description)

Obs 0.10.7 / macOS 11.1

I have “Delete Note” hotkey assigned as Command+DEL (delete right aka fwd delete)

I just noticed today that when invoking this key, Obsidian will also delete the entire line that the cursor is on, while simultaneously popping the confirmation box. If the user hits “Cancel” without looking carefully, they will miss this fact and face data loss (as I did…)

Can this be fixed? In general if hotkeys are providing 2 functions, they should not be assignable or a warning should be displayed.

Steps to reproduce

  • Change the command+[ hotkey to Navigate back
  • Open a note and go to a line with an indented list item
  • Press command+[
  • You’ll be on the previous page, go back to the note with the list
  • You’ll see the list item was left indented

Expected result

Navigation without the indent

Actual result

Both

Environment

  • Operating system: OSX 10.15.7
  • Obsidian version: v0.10.9 installer v0.9.20
1 Like

I just noticed this (again, apparently) when I tried to map +] to Toggle Right Pane and suddenly everything was indenting.

Is this one of those things that the upgrade to CM6 will resolve?

This issue has nothing to do with cm5/cm6

Sorry. The title “redefining shortcuts handled by Codemirror” threw me off :confused:

I’ve tentatively identified the root cause for this bug, and implemented a workaround in one of my plugins; see this Github comment for technical details on the cause and the code of the workaround.

I’ve got a plugin working that unsets some code mirror hotkeys. I’ll try to get it added to the community plugins.

this will be fixed in 0.11.10

1 Like

Ctrl + M minimizes the Obsidian window, and can not be over-ridden by reassigning the shortcut.

I assume this is hardwired into Codemirror?

Is there any way to disable it? Drives me crazy!!

Thanks

ctrl-m is hardwired in electron. we will try to fix that too.

1 Like