marktext: CTRL+Z not working
Description
Pressing CTRL+Z
doesn’t do anything.
Steps to reproduce
- Type some text
- Delete some text
CTRL+Z
Expected behavior: That the deleting text gets undone
Actual behavior: Nothing happens
Versions
- Mark Text: v 0.11.42
- OS: Windows 10
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 16 (11 by maintainers)
Same here. In Linux,
CTRL+Z
doesn’t undo no matter what. ButCTRL+Super+Z
seems to work. And then again,CTRL+Shift+Z
doesn’t redo at all. It’s strange to see these very commonly used functions not working as expected.P.S, : Great work on MarkText! Straight off one of the best looking markdown editor I’ve ever used. Felt like a gift from heaven when I found this while searching for .md editors. ❤️
Is there soon a way to fix the error. With version 0.16.2 it still occurs but only in Source Code Mode! Is there a workaround for it?
Hi,
It’s not ok in my computer. When I do Ctrl + Z I got a message that told me that changes will lost if I do not save them.
Keyboard: azerty (french)
Regards.
Thanks @clrh and @stefnotch, I can confirm the issue on Linux and Windows and we’ll fix the issue as soon as possible.
@clrh Which operating system do you use?
I just tested it (Windows 10) and can confirm this issue with the French keyboard layout.
It’s probably because
w
<–>z
(qwerty
<–>azerty
)@stefnotch @rgomez90 @dibyadas
I’m happy to announce that we solved the keybinding issue. Could you please check whether everything is ok on your machine. Maybe we have to improve the solution, particularly relating non US-keyboards. Prebuilt binaries for Linux and Windows are available here. Please see PR #543 for more information.
Thanks!
I recently installed MarkTest and I’m having this issue, not being able to undo via shortcut. It does not matter how long I wait or/and type, undo via shortcut never works.
@Jocs Here you go.
So, here is a GIF where I’m doing the following things
File->Undo
andFile->Redo
optionsCTRL+Z
File->Undo
which doesn’t appear to do anything at allFile->Undo
which does undo the typingI think that the issue is that
CTRL+Z
is interpreted as me typing some text instead of as a shortcut.Unfortunately, it’s a problem in a third-party library dependency (
keyboardevent-from-electron-accelerator
orkeyboardevents-areequal
) with wrong virtual key mapping and it’s also a little bit inconsistent. E.g.France keyboard:
Ctrl+W
andCtrl+Z
:Cltr+W
Cltr+Z
German keyboard: Both
Ctrl+Z
andCtrl+Y
are interpreted asCtrl+Z
.The good part of this is that we already forked the library and we could just change the virtual keys at runtime. Well, let me see…
OK, did a quick check and I think
Ctrl+Z
is a duplicate of https://github.com/marktext/marktext/issues/216 because I can pressCtrl+Super+Z
to undo on Linux. And I can confirm the double menu undo bug if the cursor is not at the end of the line. If the cursor is at the end of the line everything is OK.Edit: replace “end of the line” with “end of the text you inserted”
e.g.
aaaaa
, then insertbbb
(aaabbbaa
). The cursor have to be after the lastb
because each cursor position change is tracked as a undo-operation.