Open schmurtzm opened 2 years ago
Clavier+ saves shortcuts aggressively (arguably too often), including when closing the configuration window with "OK".
The "Apply" button approach is a compromise between the current situation, and the reflecting changes immediately while the window is open. "Apply" would do nothing if there are duplicate shortcuts, avoiding the problem discussed in #14.
That approach is a bit tricky to implement technically, because Clavier+ still needs to disable all the shortcuts while the "Edit shortcut" or "Simulate a keystroke" dialog box is visible, to let the user enter an arbitrary keystroke, then restore the shortcuts afterwards. The list of shortcuts to restore isn't necessarily the shortcuts in the list, but the list of shortcuts as it was the last time "Apply" was clicked or the configuration window was opened.
"Apply" is significantly useful only for text shortcuts, because program shortcuts have a "Test" button. Closing and reopening the configuration window takes only 2 clicks total, so "Apply" saves just 1 click per iteration. In practice I'm not sure the added convenience is worth the implementation complexity and the easy but tedious effort (resizing the dialog to provide space for a new button, adding "Apply" translations in all languages). I will think about it.
Thanks for your feedback.
Clavier+ still needs to disable all the shortcuts while the "Edit shortcut" or "Simulate a keystroke" dialog box is visible, to let the user enter an arbitrary keystroke, then restore the shortcuts afterwards.
Yes it still require to switch OFF the existing shortcuts during the creation of a new one.
The list of shortcuts to restore isn't necessarily the shortcuts in the list, but the list of shortcuts as it was the last time "Apply" was clicked or the configuration window was opened.
As for some softwares like notepad++, the "apply" button (which is a kind of "save" button) could be disabled when nothing has changed. It also allows to show to the user that something is not applied for the moment : he now that the list he has in front of him is not the currently applied.
Closing and reopening the configuration window takes only 2 clicks total
You're right but when you're going to create the list of your own shortcut it's a bit disturbing to open and close this windows each time and if at the end you forget to close it you loose everything (true story 😉 ).
(ps: la prochaine fois on fait ces explications compliquées en français 😄 ! )
I looked deeper into the technical details, and it seems too complicated and/or risky to implement given the limited benefits. The probability of adding new bugs is too high: Clavier+ has always assumed that shortcuts cannot execute while the configuration is visible, I don't feel like verifying all the code to ensure it's safe to change that behavior, and check any new edge cases that becomes possible, such as the UI freezing or the user clicking Apply while a shortcut execute.
Having to close and reopen the configuration window, while not ideal, isn't a big issue in practice. I'm fine with it when I iterate over complex shortcuts. Apply would save only 1 click per iteration.
I'm keeping this feature request open because it's theoretically feasible, but I don't plan to address it any time soon.
the "apply" button (which is a kind of "save" button)) could be disabled when nothing has changed
Yes, at the cost of even more complexity and probability of bugs.
I totally understand your point of view. I have to admit that once configured I don't return in settings UI everyday 😅 Thanks for the explanation of the "why" 😉
Hi, thanks for this very great software. A button "Apply" could be very useful instead of OK which close the window immediately.
This button will have 2 benefits :
Thank you.