excalidraw / excalidraw

Virtual whiteboard for sketching hand-drawn like diagrams
https://excalidraw.com
MIT License
74.94k stars 6.76k forks source link

Control-Z working only on English keyboard #8003

Open kirillrocks opened 3 weeks ago

kirillrocks commented 3 weeks ago

Hey!

I am using 4 different languages, but for Control-Z to work, I always have to go back to the English layout. On Russian/Ukrainian/Dutch it is not working.

This is the only tool that has that limitation.

Mrazator commented 3 weeks ago

Hi @kirillrocks! Does it mean that when you are on English layout, it works just sometimes or it always works with English layout, but not the other ones mentioned? Asking due to the comment in https://github.com/excalidraw/excalidraw/issues/5375#issuecomment-2104348111

Mrazator commented 3 weeks ago

Could you reproduce the issue on excalidraw.com? Trying out dutch layout on Chrome, MacOS (command + z) and I can't reproduce it.

kirillrocks commented 3 weeks ago

Hey @Mrazator. Can reproduce on Excalidraw.com.

There is another issue with command+z that sometimes it just losing it's memory (even with manually clicking on redo/undo). But this issue is specific to the language.

I am on Windows10, Chrome(latest version).

kirillrocks commented 3 weeks ago

@Mrazator, can you try the non-Latin alphabet? Maybe Cyrilic?

Mrazator commented 3 weeks ago

I could try with non-Latin but not sure if I will be pressing the right keys :) Could you please provide us with explicit repro steps?

Mrazator commented 3 weeks ago

Similar to Dutch, switching to Russian layout works as expected for me, with "Z" being in the same position in both. Interestingly Dutch-Belgian has intertchanged "Z" with "W", so it instead closes the tab. I suspect that some combination of pressed keys (i.e. due to switching languages) could lead to refresh (like CTRL+R), but I guess you would notice the tab would close / reload, unless it's some kind of silent refresh.

kirillrocks commented 3 weeks ago

That is strange, but I work in Linear and ClickUp, and it seems to work there in every language. How can I help you to reproduce the issue?

dwelle commented 3 weeks ago

@kirillrocks in order to identify the issue, we need to separate the "ctrl-z doesn't work on non-english layout" from "undo sometimes doesn't work at all (from UI)".

If you can reproduce the latter, please open up a new issue with steps. Also make sure that your browser isn't being reloaded as @Mrazator suggested could be happening.

As for making the shortcut work on non-english layout, we'll investigate what we can do.