can't remap control z

Hey i downloaded krita earlier today, and i’ve been trying to remap the undo function (control z) to the “enter” key but when i confirm it, neither enter nor control z works and the only way to undo is by clicking the button. is there any way to fix this?

Hello and welcome to the forum :slight_smile:

The Enter/Return key seems to be ‘special’ and not suitable for use as a keyboard shortcut.

You can easily use another key that isn’t normally used, such as ‘S’ or ‘F8’ or anything else you can find by checking in the keyboard shortcuts for if it’s already used.

That’s because the enter key is hard coded to be the “apply” key. For example when you do a transformation or a crop or you are simply in some dialog or entering values you hit enter to apply the changes you made.

Oh, I think I know what your topic is about.

Do you mean that you then have to use the icon on the Toolbar or the
Edit → Undo menu action?

This is unfortunate but can be fixed.
You can delete the personal shortcut configuration file, called ‘kritashortcutsrc’, which will revert all your personal shortcuts and give the default shortcut behaviour.
Or you can edit it with a text editor to remove the line that says ‘edit_undo=Return’ (or maybe ‘edit_undo=Enter’).

That file, along with the other configuration files is found in the
C:\Users{your username}\AppData\Local folder.

After restarting krita, things should go back to normal/usable.

Instead of deleting the config files, there is a “restore defaults” button in the shortcut settings but simply setting ctrl + z again or any other key for undo should work too.

Yes there is and I always forget about that and I haven’t tried it.

For some reason, for me, that doesn’t work if I’ve set Return/Enter as the custom shortcut key. The Return/Enter key really is special.

That’s weird. Maybe we should consider it a bug that Enter even can be set as a shortcut and report it?

Yes, it’s not good and could cause problems as it causes me a problem.
I’ll be very busy today and I need more time to have a deeper look and check what’s happening with my system.

If you want to investigate further and raise a bug then I’ll add whatever comment or confirmation I can when I have more time. Or, I’ll raise one later when I’ve looked into it more.

The problem I noticed only happens with the MATE desktop on LInux, I tried Debian and Ubuntu.
It doesn’t happen with Windows 10 and it doesn’t happen on KDE Neon.

@Baisol, Unless you’re using the Linux MATE desktop, you should be able to set the Undo shortcut back to default (Ctrl+Z) or set it to any other unused key combination and that should work immediately.

@Takiro, With MATE, setting the shortcut to Return/Enter locks it to Return/Enter for the duration of that session (and Return/Enter doesn’t work as a shortcut key).
Attempts to change the shortcut are immediately and correctly noted and recorded in ‘kritashortcutsrc’ but are not implemented inside the session and do not appear in the Settings keyboard shortcuts listing.

After krita is restarted, the contents of ‘kritashortcutsrc’ are correctly implemented.

Because it’s MATE only (based on the limited testing I’ve done) and it’s recoverable, I’d regard the problem as Minor but it would be a good idea to not allow an attempt to use Return/Enter as a shortcut because it doesn’t work anyway.

I’ve reported it: 437895 – Return/Enter can be set as a keyboard shortcut but it doesn't work

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.