GNOME Bugzilla – Bug 502309
Improve hotkeys (external tools)
Last modified: 2007-12-14 13:33:34 UTC
I propose to rename the "Hot Keys" feature to "External Tools". The name hotkeys suggest that I can assign custom hotkeys to existing functions. And that is not the case. Additionally, I we can make the feature even more useful, by supporting an unlimited number of external tools with the possibility to assign a custom hotkey. The numeric keypad is for instance not ideal on a laptop. For the dialog, we could use a treeview (with two columns for the name and the hotkey of the tool) and add/remove/edit buttons. For editing, we can have an additional dialog or use the area below the treeview: Name Description (optionally) Command Hot Key (optionally) If an additional dialog is used, the special characters can be explained here and thus the preferences dialog can be reduced in size (all other tabs are already much shorter).
Are you proposing multi-key hot-keys (Like Ctrl+Shift+p)? I chose the numeric keypad simply because almost all of the other keys were already reserved in some way. Laptops usually have some way of emulating the the numeric keys. However, if you have a better workable system, please go ahead... The UI is currently minimalistic due to my weak UI and treeview skills. It could be much better, as you describe. Patches welcome! - Mike
Other thoughts: 1. If a short description is mandatory, we can list the functions in an "External Tools" main-window menu or something similar. 2. We could change it so that instead of using the numeric keypad, you use a key sequence like "\" (or some other obscure unused key), followed by one-or-more-digits, followed by "enter". (I'm not sure if \ is actually unused...) - Mike
More thoughts: 3. Move hotkeys out of the preferences dialog. List the friendly script names in a "Scripts" menu, along with an "Edit" choice that brings up the main script tree-view dialog. 4. Add a unique serial number code to the script codes. 5. In the import dialog, add a "Post-import script" combo box for people who want to process imported files immediately (e.g., rename files with a unique serial number).
All good ideas. I use a Happy Hacking Lite keyboard which doesn't have a numeric keypad and no way of emulating those keypresses. I use a perl script that files images by camera and date from the exif information so being able to activate it is fairly vital. I'm using it at the command line at the moment but doing everything in gThumb would be much better. So having a menu and alternative keystrokes would be great. Andrew
I'm working on an initial patch. - Mike
OK, I've committed an initial patch that creates a treeview-based dialog in the new "Script" menu. I could use some help at this point with: 1) Sizing the dialog so that the dialog auto-fits the treeview as much as possible. (Right now the dialog is specified as a certain percentage of the screen height and width). 2) Dynamically listing the scripts (by short name) in the Script menu. Can anyone help me with those two sticking points? There's more to do, of course... - Mike
(In reply to comment #1) > Are you proposing multi-key hot-keys (Like Ctrl+Shift+p)? I chose the numeric > keypad simply because almost all of the other keys were already reserved in > some way. Laptops usually have some way of emulating the the numeric keys. Yes, I was thinking of arbitrary hotkeys. On my laptop I can emulate the numeric keys, but it is not the most user friendly feature. (In reply to comment #2) > 1. If a short description is mandatory, we can list the functions in an > "External Tools" main-window menu or something similar. My idea was also to make the tools available in a menu, but I forgot to mention that in my bugreport :-) However, I would use the name in the menu, not the description. If the tool can be accessed through a menu (or some other means), the hotkey can be made optional. > 2. We could change it so that instead of using the numeric keypad, you use a > key sequence like "\" (or some other obscure unused key), followed by > one-or-more-digits, followed by "enter". (I'm not sure if \ is actually > unused...) I think a custom hotkey is more useful and less complicated to use. Even if there are already a large number of hotkeys in use. (In reply to comment #3) > 5. In the import dialog, add a "Post-import script" combo box for people who > want to process imported files immediately (e.g., rename files with a unique > serial number). Good idea, but we'll have to take care not to make the import dialog too complicated by adding lots of options.
Emmanuele Bassi has told me how to make dynamic menus, so that's under control now... - Mike
Well, I learned a lot today... Anyway, trunk now has a script menu with dynamically generated menu items. Please test it heavily. I'm not sure I've set it up correctly to operate in all modes (browser, viewer, etc). - Mike
I think the new script implementation (in trunk) is pretty slick, so I'm marking this as fixed. I've stuck with the numeric keypad, but laptop users can now use the menu to launch scripts. The definable hotkey idea is too problematic - most single keys are used already, and the accelerator definitions are all over the place in the gThumb code. It's too messy. Requests for minor changes can go in new bugs... - Mike