GNOME Bugzilla – Bug 87157
dia keybindings Gnome 2 HIG compliance review
Last modified: 2004-12-22 21:47:04 UTC
I have mentioned keybindings on the mailing list a few times. http://mail.gnome.org/archives/dia-list/2001-December/msg00037.html http://mail.gnome.org/archives/dia-list/2002-April/msg00212.html http://mail.gnome.org/archives/dia-list/2002-April/msg00226.html This is bug to try and get the keybindings in Dia to be compliant with the Gnome 2 HIG (or failing that better consistancy with theGimp). My plan is to try and do a complete review (see below) and get feedback and then make most of the changes together. Trying to do it piece by piece will only cause conflict and be incoherent. I want to be as thorough as possible and make reasonable plans to be flexible so that future enhancements do not make the keybindings inappropriate. http://developer.gnome.org/projects/gup/hig/ http://developer.gnome.org/projects/gup/hig/draft_hig/standard-menus.html All my comments about the keybinding used by the Gimp refert to version 1.2.3 for windows. Various thoughts and Proposed dia keybingdings: ctrl+e Show All, same as theGimp maybe change the string too? the Gimp uses "Shrink Wrap" perhaps "Shrink to Fit", the HIG uses "Best Fit". i wonder if there was a specific reason for using the letter 'e'. ctrl+w close window as per the Gnome 2 HIG (dia currently *****) ctrl+a select all (requires Show All to be changed) ctrl+shift+a select none ctrl+i invert selection (the gimp, dia currently uses 'i' for "New View") ctrl+S Save ctrl+Shift+S Save As the HIG uses the menu item Save Copy (/Save Copy As) which is synonymous with Export. i dont feel any need to change this string. (it could be specific to the en_GB locale, it would need to be changed in both if at all) we dont have print preview so it may be acceptable to use ctrl+shift+P for page setup even though the HIG uses it for Print Preview, but we may want to reserve it for the future in case someone decides to do a Gnome enabled build of Dia. Redo dia currently uses Ctrl+R for redo, so does theGimp. other applications like Mozilla use Ctrl+Y (other apps tend to use Ctrl+F for Find and Ctrl+R for replace which would be useful features if you had a diagram with lots of text but unlike to appear in Dia soon if ever. Also ctrl+f is used for moving an object to the front) the HIG suggests Ctrl+Shift+Z which has the advantage of leaving an extra key available but it is a little bit more awkward to have to press 3 keys than 2. For consistancy with the rest of Gnome i think it is wisest to use Ctrl+Shift+Z (possibly have more than one keybinding??? there is always the option to set your own keybindings) Delete the HIG suggests having Delete being bound to the 'Del' or 'Delete' key but the delete key is already used by GTK to clear the current keybinding (hover over a menu item, press any key override the exisiting binding and associate it with the key you just pressed instead. delete will clear the keybinding and it will be associated with nothing) This would seriously need to be discussed with the developers of the HIG. Visible Grid (why not Show Grid? string change?) Snap to Grid (g) Show Rulers (the gimp uses Ctrl+Shift+R) Show connection points could all do with connection points, comments welcome. [TODO request enhancment: Show/Hide Status bar] Zoom in Ctrl++ (none currently, gimp uses =) Zoom Out Ctrl+- (none currently, gimp uses -) Zoom Normal Ctrl+= (in Dia this would be Zoom, 100% currently '1' same as theGimp) Send to Back Ctrl+F Bring to Front Ctrl+B leave well enough alone for now unless i get a better suggestion, theGimp uses modified PgUp, PgDwn to handle layers. I dont think unmodified single letter character 'a' or number characters '1' commands should be used generally, it might be sensible to keep them for some Zoom function (other than the ones already mentioned) or possibly map them to the default shapes (line, beziergon, polygon etc). Obviously not everyone is going to be happy with the keybindings not matter what we use. the Gtk feature that allows you to override keybindings with your own is a good start but ideally we would be able to define different keybinding sets. one of the users said he liked the keybindings used by "Solidworks (a mid-range CAD program) " but they do not Ctrl instead use single letters for most of the commands. http://mail.gnome.org/archives/dia-list/2001-December/msg00054.html That is pretty much it, i have just about run out of ideas. I will probably try put together a matrix (spreadsheet+webpage) to track the used/available kebindings. i am going to ignore bug 69386 as it is too vague and i find the gnome bugzilla permisions too strict when i am not the reporter (and even sometimes even when i am). I think bug 69386 is pretty much covered by the GTK feature that allows you to set your own keybindings. (the pic in the guidelines makes me think it might be nice to have the option to put the recent files into a submenu on their own, especially for the purposes of tearing it away)
Overall: Yes, now would be a good time to fix keybindings. Some comments on debatable stuff: Export should remain Export -- the important difference is that if you Export something and then Import it, you probably won't get the same diagram. Redo on Ctrl-Shift-Z is a lot more intuitive (given that you know Undo to be Ctrl-Z) than the other options. And redo is in my experience a rarely used action. For Delete and deleting key-bindings: Why doesn't hitting Delete on a menu item with no binding add Delete as the binding? GTK stuff, I guess. But we can still have Delete be a static binding, people just won't be able to assign it to anything else. We should definitely get rid of 'g' and '1' for shortcuts. While we want to be able to use single-key shortcuts, those should IMO be reserved for user-defined shortcuts (except Del, PgUp etc). Ctrl-= for 100% zoom sounds good. Gimp layers are different from Dia object ordering, though not generally as heavy-weight as Dia layers. For instance, Dia objects can be multi-selected and moved up/down as such (we've discussed this in #85812)
The delete shortcut can indeed be set with Del on an empty spot in Gtk2. Hadn't tested that in the new version.
"=" is a bad shortcut. It's composed as Shift+0 on some common European keyboard layouts and gtk 1.x didn't treat Ctrl+Shift+0 correctly as Ctrl+=. I don't know if gtk2 does. Read more about it in bug 56108.
A couple of comments: - I didn't write this section of the HIG, but I don't believe "Save Copy" is supposed to exactly replicate "Export". I think it's supposed to do the same as "Save As" (which may or may not allow you to save as a different format), but *without* changing the filename of the document you're currently working on. The HIG wording could be better here... I'm on it :) - Ctrl+Shift+P : I think it would be good to reserve this for Print Preview, dia sounds like exactly the sort of app that would benefit from a print preview feature sometime in the future Basically agree with all your other comments... keep up the good work :)
Undo Redo using Ctrl+Z for Undo and Ctrl+Y for Redo i believe the rationale for using Ctrl+Y is that Y comes before Z Mac OS X uses CommandKey/appleKey + Shift + Z for Redo and this seems more consistant and logical. The user is more likely to be able to geuss this than CommandKey + Y If we follow on this consistant scheme of keybindings then Group and ungroup should be Ctrl+G and Ctrl+Shift+G respectively (as opposed to the current values of Ctrl+G and Ctrl+U). Short of doing actual usability survey/testing i dont think there is any good way to know what way is best. If anyone has a copy of the Apple guidelines or any documentation that would help figure out why things are done this way it would be very helpful.
I got a demo of Visio the other day. Flip Vertical Ctrl+J Flip Horizontal Ctrl+I i and j, for Flip Horizontal/Vertical. very clever and logical as many mathematical people are familiar with using I and J to represent horziontal and vertical. I intend to use these for Dia. I had considered that perhaps Select Invert Ctrl+I but I strongly believe Flip is a more useful/used feature. hmm, in dia flip h/v are buried in context menu but not in the object menu. I will have to see about getting that changed.
I have been told that in Gnome2 you can bind Delete as a keybinding (backspace is used instead to clear keybindings) So Delete should be bound to delete. Dia used Ctrl+D for Delete, this was actually worse than it seemed. In both Gobe Productive Draw and Microsoft Visio 2000 and other programs Ctrl+D is bound to Duplicate. So migrating users could have deleted things when they actually intended to dupicate them. I think this has changed since the Draft HIG. v1.0 of the Guidelines currently recommends Duplicate Ctrl+U Delete Delete Ctrl+D is claimed for Bookmarks, maybe they have plans to have bookmakrs everywhere like Microsoft has with its equivalent, i dont really know (and i am getting way off the point).
Created attachment 11234 [details] gzipped diff
Horizontal/vertical flipping is not in the general menu because only shapes support it, not programmed objects.
Patch applied, thanks!
Alan said: > I dont think my patch was adequate to properly close bug #87157 > > I did not want to bind Delete key to Delete without being able to test it > properly. This should be easy but i had a nervous feeling it might not > work exactly right. Reopening the bug.
TODO (hopefully before next release): Delete Del Ungroup Ctrl+U (changed my mind about using Ctrl+Shift+G) need to figure out sensible new shortcut for "Show All"/Best Fit/Whatever you call it. If i have not already used Ctrl+E it might be a suitable shortcut for Export.
In case i forget Show All, or Best Fit? I was thinking Zoom to Fit, Acrobat Reader uses "Fit in Window" -- I was thinking Copy Text Ctrl+Shift+C Cut Text Ctrl+Shift+X Paste Text Ctrl+Shift+V Hopefully the text widget in Dia could be enhanced and done things more by context and seperate cut/copy/paste would be unnecessary (need to file seperate bug). At that stage Dia would probably use Paste Special Ctrl+Shift+V to allow for certain exceptions.
i discussed using Ctrl+U for Ungroup on irc.gnome.org#usability no definative answers, will need to ask again another time. I am unsure if it is best to leave it as as Ctrl+U and change it to Ctrl+Shift+G if and when we need Ctrl+U for something else or make the change now to avoid future disruptions. I should probably mention that if and when Dia includes a Duplicate option i have every intention of violating the HIG and using Ctrl+D rather than Ctlr+U for Duplicate, unless anyone thinks that it is likely that Dia will want to have "Add Bookmark Ctrl+D". I'm confident I can get the HIG people to agree with me on this basis.
I am thinking 'New View' could be Ctrl+Shift+N Note that in Abiword (and msword and msoffice) "New Window" has the same functionality as 'New View'. I think 'New View' nearly makes more sense ... man im tired, my eyeballs are starting to hurt, literally, im going home.
bollox there goes using Ctrl+Shift+A for Select None/Select Inverse. (invert invers, aaargh!!! grammar overload, bleuch, nevermind ...) http://developer.gnome.org/projects/gup/hig/1.0/userinput.html#shortcuts Use Shift-Ctrl-letter for functions that reverse or extend another function. For example, Ctrl-Z and Shift-Ctrl-Z for Undo and Redo. Note that you cannot use Shift-Ctrl-A-thru-F, however, as these combinations are used to enter unicode characters in text fields.
At some point, we will most like split text input into a separate input
system, so the keyboard shortcuts don't interfere. Not right now, though.

Created attachment 14244 [details] [review] Patch keybindings Cut/Copy/Paste Text Ctrl+Shift+C/V/X
*** Bug 69386 has been marked as a duplicate of this bug. ***
Lars could you commit this patch and then close this report I will make new reports as necessary. I know I should get organised but in the meantime I am blindly patching stuff so i dont want to commit it myself without proper testing.
closing, I have rolled that last patch into another patch