Why can’t you use the space bar to select check box and radio button elements from a menu?


Nektar wants to know why you can't use the space bar to select check box and radio button elements from a menu.

The short answer is "Because it's a menu, not a dialog box."

The check mark and radio button are just visual adornments provided by the menu manager as a courtesy; they do not affect the behavior of the menu itself. Notice, for example, that there is no way to specify "radio button groups" in a menu, so the menu manager wouldn't know which items needed to be deselected when you select a radio button menu item. (I guess it could infer them from separators, but then you would have people saying "I want my radio button group to exclude item number 4, but I don't want to put a separator in between; that looks ugly.")

And then how would a program reject an auto-selected check box or radio button? E.g., the user pushes the space bar to turn on Show the Widget Bar and an error occurs trying to show the Widget Bar. If the program displays an error dialog, that would dismiss the menu. So maybe the program would just silently re-uncheck the box, which leaves the user puzzled as to why the space bar "doesn't work" for turning on the Widget Bar. Or worse, what if hiding the Widget Bar causes the menu to reconfigure itself? (Maybe there are some menu items that are visible only when the Widget Bar is selected; if the user hides the Widget Bar, those menu items need to be deleted.) Windows doesn't have a precedent for menus reconfiguring themselves while they're being displayed. What if one of the items that gets deleted when you hide the Widget Bar is the menu item that contains the Widget Bar checkbox? ("I turned off the Widget Bar, and my menu disappeared!")

That said, there is no technical reason these design issues couldn't be overcome. You could have a style like MF_GROUP that behaves like WS_GROUP to establish the scope of menu radio buttons; you could have some way to mark a menu item as "this is an unselected check box" or "this is an unselected radio button"; you could come up with a way for a program to reject a user's attempt to change the check box status; you could design a way for menus to be dynamically reconfigured while they are open; you could even design a way for menus to respond in some vaguely reasonable way when the item the user just selected gets dynamically deleted! But all of these features take effort, and they detract from the simple design of a menu as "Here's a list of things you can do. Pick one. Once you pick one, the menu dismisses." Every feature starts out with minus 100 points and needs to beat out the other 200 items on the list.

Comments (17)
  1. Peter da Silva says:

    How many points do you get when the existing behaviour violates the principle of least astonishment?

    Windows used to have a very keyboardable user interface. In fact that was one of the things I found most attractive about it: unlike just about every other UI, you could reliably use Windows without having to mess with the mouse.

    I don't know when things started to go downhill, but Windows 95 introduced a lot of UI elements with surprising behavior, and the current Windows/Office UI is an ergonomic disaster. It's a shame they can't go back to about Windows 3.11/NT 3.5 and start over.

    [Um, Windows 3.11 didn't support space-bar-toggle menus either. -Raymond]
  2. AC says:

    You can still check those entries with ENTER, just like any other menu items.

    If I understand correctly, the hypothetical difference using the space bar is that the menu would stay open.

  3. Maurits says:

    IIRC (and I may be wrong) Windows 3.11 didn't support "checkable" menu items at all; that was a Windows 2000 innovation.  The pre-Windows 2000 way to do this:

     Foo

    x Bar

    was:

    Show Foo

    Hide Bar

  4. MItaly says:

    @Maurits: http://www.iconbazaar.com/…/lview02.gif; by the way, if I recall correctly in the Program Manager "Options" menu there were three options (one of which was "Save settings on exit") which were checkable.

  5. Maurits says:

    Retracted :-)

  6. Michael Liu says:

    Word 2007 lets you use the space bar to check and uncheck items in the shortcut menu for the status bar.

  7. Andreas Rejbrand says:

    @Michael: And so does Word 2010. It is highly convenient, if you ask me. What if you wished to uncheck all items, and the menu disappeared each time you unchecked one of the items!

  8. Maurits says:

    Those wacky Office guys are always pushing the UI envelope.  I'm always discovering little surprises.  For example, if you press the context menu key in Excel (AKA the "right-click" key) then you get one menu; if you actually right-click with the mouse, you get that menu plus another one.

    Surprise, generally speaking, is not a good thing in the UI world.

  9. Joshua says:

    Wait a minute. I remember coding a check on/check off menu item in Win16 on Win95. MF_CHECKED worked just fine back then.

    I'm quite convinced this worked on Win3.1 since my compiler's documentation for Win32 seemed to predate Win95.

  10. Andreas Rejbrand says:

    @Maurits: Well, but there is no way to navigate to the minitoolbar using the keyboard, so it actually makes sense that only the ordinary popup menu is shown when you press the context key on the keyboard.

    Another feature of the Office 2010 menus is that you can use (Shift+)Tab to navigate them.

  11. MItaly says:

    The Office 2007 menu IIRC are browsable pressing first the / key and then using the keys that appear in tooltips over the various items. Once you know it it's fine, but it's surely against the PLA (I've never seen anything that goes in "keyboard shortcut mode" when you press the slash key).

  12. MItaly says:

    s/menu/ribbon bars/

    (of course it was not strictly related with the article, but since we're talking about Office doing strange UI things…)

  13. Neil says:

    @Matteo Italia: Lotus 1-2-3 for DOS.

    I keep trying to active menuitems with the space bar, presumably because I'm used to activating buttons with the space bar (Enter only works if the dialog manager hasn't been confused into making some other button the default. Yes, it happens. Sigh.)

  14. Paul Parks says:

    @Matteo Italia: I'm guessing that support for the slash key is to make Lotus users happy, as Neil mentioned, but the documented way to bring up keyboard tooltips with the Ribbon is by pressing the Alt key.

  15. Worf says:

    Hrm, modes in Office? Will this mean we can get a Vi-like interface soon?

    (Yeah yeah, there's ViEmu…)

  16. LocalH says:

    I miss the old Amiga days where you could select multiple items without having to go back to the menu bar to bring it back up – hold down RMB to bring forth the menu bar, and while holding RMB click LMB on each item you'd like to toggle. This only worked with menu items that didn't spawn a dialog or other type of window, but it was still insanely handy at time.

  17. jader3rd says:

    @AC

    When I've been faced with a dialog and I want to select the items I end up going for my mouse even though I don't want to. The reason why is because I don't want to spend the time to find out how this dialog box is going to work. I'm saying this as someone who would love it if I only ever had to use the mouse in paint. The problem with "try enter" is because I've been burned hitting enter, hoping it'll select the checkbox/radio button/funky control, and the next/finish button ends up being hit. As a result I've now gone onto the next window. Maybe it's something that only happens in webpages, maybe it's not.

    The end result is that, as an end user, Windows is not helping me discover how I can use the keyboard to make using this application easier.

Comments are closed.