guilryder / clavier-plus

Clavier+ keyboard shortcuts manager for Windows
https://gryder.org/software/clavier-plus/
GNU General Public License v3.0
334 stars 22 forks source link

[Feature Request] add some editing features #17

Closed schmurtzm closed 2 years ago

schmurtzm commented 2 years ago

Today I edit many of my shortcut, I was thinking that some editing features are missing :

Thank you !

guilryder commented 2 years ago

Thanks, I will think about these on a case-by-case basis.

schmurtzm commented 2 years ago
* Ironically, adding custom keyboard shortcuts to the list of shortcuts isn't as trivial as it should be. I'm unsure that deleting shortcuts is frequent enough to deserve a solution faster than Shift + click on the "Delete" button.

Wow "Shift + click on the "Delete" button." ...hidden trick ! 😄 It's really a detail, not as important as the apply button or the focus thing. But I didn't think it was complex due to the fact that it is exactly the same behavior as when you press the button delete (yes, we would still keep the confirmation)

* Adding a "Duplicate" button isn't too difficult. As usual the cosmetic stuff ends up taking the most time: finding or designing an icon, getting translations in all languages for the tooltip, making room for the button in all translations of the dialog.

May be I could help for all the cosmetic stuffs text and translations ? Yes it's an optional detail too, for example I have these awesome shortcuts to switch between the different inputs of my monitor : Commande=ControlMyMonitor.exe /SetValue "\\.\DISPLAY2\Monitor0" 60 15 As I have 4 inputs it was faster to modify the "Clavier.ini" with notepad++ ... So duplicate button can be useful . By the way if you modify your "Clavier.ini" manually , if clavier+ still running it will very probably overwrite your settings (true story 😄).

* Adding a context menu is similar. It does require new translations because the button tooltips are too long for menu items. I don't know if it's very useful though: it's less discoverable than the buttons, which are always visible and easy to access.

Agree, very optional... However I think many users has made a right click on the config UI. May be if I give you all the translations it can motivate ? 😅

  • Allowing file drag & drop looks fairly simple if we ignore edge cases like pseudo-files with no path or drag & drop of multiple files at once. I think it provides substantial value over locating files via the standard File/Open or Browse for Folder dialog box. Agree I think that it is the most valuable thing in this list, it really allow to create shortcuts in a fast way : Drag and drop, the shortcut window creation appear , we click on the apply button, we test it (without closing the window) , done ! (yes this scenario is a combination of multiple requests 😄) .
guilryder commented 2 years ago

I started working on some of these:

Beta version: http://utilfr42.free.fr/dn/beta/Clavier.exe (includes other improvements & fixes I have not tested thoroughly yet)

"Shift + click on the "Delete" button." ...hidden trick !

Not hidden, just easy to miss: the confirmation message documents the feature.

May be I could help for all the cosmetic stuffs text and translations ?

Most of the difficulty is being careful not to make mistakes when editing the layout, and testing the interface for each of the 12 languages. It would take me longer to explain & verify everything than doing it myself, not to mention that it requires programming tools.

I might do some of the changes in English and French only. The features are optional, just for convenience, so it's not too bad if some languages don't have them. I'm just not convinced (yet) that it's worth the trouble and/or the screen real-estate. The configuration window is already quite complex, each new control needs to pull its weight.

Taking "Duplicate" as an example, the user can easily copy-paste the text or command-line, will have to change the keystroke anyway, and the other options usually remain to their default values.

if you modify your "Clavier.ini" manually , if clavier+ still running it will very probably overwrite your settings

Yes, as I mentioned Clavier+ writes its configuration file quite aggressively.

schmurtzm commented 2 years ago

I started working on some of these:

  • drag and drop
  • Delete and Shift+Delete keyboard shortcuts: not very difficult, but requires changes to intercept keyboard shortcuts in the list

Del key is convenient, I don't find any problems with it. Drag and drop is an awesome feature ! Some remarks on this first beta :

The configuration window is already quite complex, each new control needs to pull its weight.

ps: may be you could allow ctrl+c / ctrl+v instead adding an additional button in the interface ?

guilryder commented 2 years ago

Little bug when importing executable with drag and drop : quotes are missing

Good point, will fix.

put the focus on "keyboard shortcut" window

It's the current behavior already, at least on my machine. The "shortcut" field is the first control of the dialog box so gets the initial focus. Same behavior as Add / Write text.

may be you could allow ctrl+c / ctrl+v

That would require interacting with the clipboard (adding a new clipboard format), which is too complicated for the benefits provided. Also, the feature would difficult to discover.

schmurtzm commented 2 years ago

I found a different behavior with drag & drop on shortcuts (.lnk files) : if you use the classical way to add a shortcut, the shortcut will be replaced by the executable path, it is not the case when you add a shortcut by drag & drop.

One detail : I can't drag & drop from start menu. It displays a forbiden icon . I saw that it not possible in some apps (notepad++ refuse too) but possible with other apps (winamp accept anywhere, vscode accept if you drop in the tabs files bar but not elsewhere). So I think there is a field property to allow drop... Could be useful because start menu is a good place to find programs quickly.

Edit : on the last beta quotes are well repaired.

schmurtzm commented 2 years ago

After some tests on "FocusOrLaunch" I have modified all my app launchers shortcuts and now I can confirm formally that Apply button, duplicate button and Allowing to test shortcuts when main Window is open could be useful features 😄

guilryder commented 2 years ago

if you use the classical way to add a shortcut, the shortcut will be replaced by the executable path

Thanks, I forgot to reuse the mechanism that Clavier+ already had. Should be fixed in the latest beta, although the mechanism is the same imperfect heuristic as for Add / Program. All shortcuts can be executed, but they don't necessarily expose a path or command-line. Clavier+ falls back to the *.lnk file path when unable to find a better command-line.

So I think there is a field property to allow drop... Could be useful because start menu is a good place to find programs quickly.

Drag and drop supports only entities that have a path: physical files & directories, network locations like \\machine, maybe others I don't know about. Shortcuts are *.lnk files therefore supported (and resolved with the heuristic mentioned above). Apps and other special objects (This PC, Recycle Bin, etc.) have no path so are not supported. Clavier+ supports apps via the built-in Add / App menu.

schmurtzm commented 2 years ago

Thanks, I forgot to reuse the mechanism that Clavier+ already had. Should be fixed in the latest beta, although the mechanism is the same imperfect heuristic as for Add / Program. All shortcuts can be executed, but they don't necessarily expose a path or command-line. Clavier+ falls back to the *.lnk file path when unable to find a better command-line.

Tested on last beta, seems OK to me, thanks again for the quick fix.

Drag and drop supports only entities that have a path: physical files & directories, network locations like \\machine, maybe others I don't know about. Shortcuts are *.lnk files therefore supported (and resolved with the heuristic mentioned above). Apps and other special objects (This PC, Recycle Bin, etc.) have no path so are not supported. Clavier+ supports apps via the built-in Add / App menu.

In this case I talk about some real .lnk in the start menu of Windows 10, they should have a real path but there is an abstrac layer I think. But it's not a big deal. What could be useful is using the search of the start menu to quickly drag and drop items but it seems that it will never happen.

About the eventual button duplicate, let me make a proposition : I was thinking that you could put the field "Beware that all shortcuts are disabled while this window is visible." in the title bar and shorten it, something like that : image Like this the remark is more visible and you have some place to add buttons 😄

guilryder commented 2 years ago

I talk about some real .lnk in the start menu of Windows 10, they should have a real path

Yes, but maybe Windows 10 doesn't use the standard file drag and drop mechanism for start menu items.

About the eventual button duplicate, let me make a proposition : I was thinking that you could put the field "Beware that all shortcuts are disabled while this window is visible." in the title bar and shorten it, something like that :

This is a non-standard customization that has edge cases with some languages, is not easy to do, and may cause trouble the next time Windows changes the look & feel of title bars. I don't think the message deserves such emphasis anyway. The dialog box has a permanently visible message. The documentation mentions it too in red text. I remember receiving only one email about it, and it was to clarify what the message meant, If some users don't see any of these, too bad for them :) I prefer sticking with the current, simple approach.

Anyway, I still need to do some polishing & testing and release a new official version, but I consider this issue resolved.