cronboard icon indicating copy to clipboard operation
cronboard copied to clipboard

Add Esc/Enter as a shortcut on modal screens

Open diegotolentino opened this issue 2 months ago • 1 comments

I've added Esc to Cancel, and Enter to Save both modal screens. This is a familiar key shortcut for those used to terminal solutions.

diegotolentino avatar Oct 17 '25 15:10 diegotolentino

Hi @diegotolentino

That's a good idea, but before I could check the code itself, I tried the solution and I found a bug.

If you open a modal (like when you want to create a cronjob), use Enter to save (you will get an error saying you need to write an expression etc) and then you don't use Esc to cancel, but you use the cancel button, Cronboard crashes:

DuplicateIds: Tried to insert a widget with ID 'error', but a widget already exists with that ID (Label(id='error')); ensure all child widgets have a unique ID.

I think it is my fault. Or my implementation of the error label, which does not take in account your solution.

Do you want to take a look to it as well?

Thanks a lot!

antoniorodr avatar Oct 17 '25 16:10 antoniorodr