Why can’t I use &-accelerators on the Start menu?

The first letter of the program is the accelerator and there’s nothing you can do about it. So if you have ten programs by Microsoft, they all use the accelerator “M”. (Yes I hate this too. The first thing I do after installing a Microsoft program is go into the Start menu and delete the word “Microsoft” from the front.)

For Win32 menus, the ampersand character acts as the marker for the menu accelerator. For example, you would set your menu text to “Save &As” to set Alt+A as the accelerator for the menu item.

This isn’t done for the Start menu and for the Favorites menu because the ampersand appears in program names occasionally. Otherwise, “AT&T Internet” would end up displaying as “ATT Internet”. (This was a real problem in Windows 95, where the Start menu was constructed from your old Program Manager groups, and occasionally we’d run across one that had an ampersand in its name.)

Comments (19)
  1. Anonymous says:

    Seems to me like a perfect example of why out of band data shouldn’t be stored in band.

    The accelerator key shouldn’t be denoted with an ampersand in the text string, it should be a seperate field (for both normal menus and the start menu). You could just have it be an index into the string, and then you’d not have to worry about any "what if I want & in my string" issues.

    But it’s hard to change 20 years of history of doing something the broken way now … :)

  2. Smelly says:

    Why not just use ‘&&’ or ‘&’ or something to produce a printable ampersand? Those patterns are probably rare enough to avoid most problems.

  3. lejordet says:

    Doesnt && give you a printable ampersand already (in regular menus, at least)? Or is my memory suffering from lossy compression?

  4. First of all, thanks for the great blog Raymond. The information you post here is always fascinating.

    One thing I should note, is that if you do decide to put an ampersand in a program name on the start menu, it won’t be drawn as an underline, but the key will still work as an accelerator.

  5. Raymond Chen says:

    Yes, it’s true that && gives you a single ampersand in the output, but remember, this is an upgrade compatibility issue. AT&T created their Program Manager icon in 1993 with a single ampersand in its name since that’s how you put a single ampersand in the name of a Program Manager group. So what’s done is done. You can’t set your time machine to 1993 and tell AT&T, "Hey, could you double that ampersand for me? Thanks."

  6. Phil Scott says:

    I just tried the & in the startment (I renamed Microsoft Office Microsoft &Office) and sure enough I could use the O key as a shortcut. Unfortunately, it still rendered the &.

    I learn two or three things everytime Raymond posts it seems.

  7. James says:

    When importing Program Manger names into the Start Menu, why couldn’t existing ampersands be converted into &&s instead?

  8. Tom says:

    Urgh, I just *hate* programs which have long start menu names. After installing anything I rename it, I think the worst offender is Adobe – I seem to remember something like "Adobe® Photoshop© v6.0™", which was quickly renamed to "Photoshop".

  9. KiwiBlue says:

    There’s at least one program which adds ‘for Windows’ phrase to its entry in Start Menu :)

  10. Mike Dimmick says:

    Would that be ‘Debugging Tools for Windows’?

  11. KiwiBlue says:

    I was referring to ‘POV-Ray for Windows’, but your choice reminded me of ‘Rational PurifyPlus for Windows’.

  12. Raymond Chen says:

    Doubling the & on conversion from Program Manager would have made the Start menu look prettier, but it would have made Explorer look worse. (Right-click the Start button, select Open, then go to a folder, and the items would show up with double ampersands.)

  13. quanta says:

    KiwiBlue: Photoshop was not the worse offender. Can you imagine seeing this: "Corel WORDPERFECT 8 Suite for Windows" in the Start Menu’s corkboard spot? My dang Start Menu was a mile wide. Most recently, I saw "FINAL FANTASY VIII Official Benchmark 2 for Windows"…

  14. alex says:

    How do you like these two:

    Microsoft DirectX 9.0 SDK Update (Summer 2003)
    Visual Basic .NET Resource Kit Content Folder

  15. Ben Wilhelm says:

    My current worst Start Menu item is "Intel(R) VTune(TM) Performance Analyzer". Naturally, it contains an item labeled "Help for Intel(R) VTune(TM) Performance Analyzer". Why not just "Help"? I mean, it’s not like I’m going to think it’s AIM help or something.

    I personally tend to go through every month or two and eliminate most of the groups. Programs have a tendency to install half a dozen icons (Run, Uninstall, Homepage, Readme, Help, and sometimes more – I have one program that installs no less than seven seperate documentation files, and it’s just an image viewer), so I dump the program group in a subfolder titled "Junk I Don’t Need" and put the "Run" link in a group of my own, all of which have short names.

    Keeps it nice and clean . . . well, until I install something else.

  16. israel says:

    So I just dragged "Run" & "Search" off my (xpsp1a) start menu to my quicklaunch. They both have ampersands. Raymond?

  17. Timwi says:

    I am sorry for being a little negative here, but this: <cite>"Doubling the & on conversion from Program Manager would have made the Start menu look prettier, but it would have made Explorer look worse. (Right-click the Start button, select Open, then go to a folder, and the items would show up with double ampersands.)"</cite> – is a pretty lame excuse. Whenever you run into problems like that you should realise that the entire idea is majorly flawed.

    I never understood why you use small files within directories to represent entries in the Start Menu. Not only is this mapping concept rather difficult for casual users to grasp, it also introduces the subtle inconvenience that on FAT file systems, each of the "small" files aren’t really that small anymore. What is a user supposed to think when they see that the files in the Start Menu are a few kilobytes in total size, but actually take up hundreds of kilobytes?

    Anyway, back to the original problem. What you should have done is you should have converted the ampersand in Program Manager icons/groups to double-ampersands and then created a dialog to edit the Start Menu in a user-friendly fashion, including keyboard shortcuts.

    As for myself, this whole problem with the ampersands (i.e. the missing support for keyboard navigation) is the entire reason why I’m not using the Start Menu at all (I only have a Start Up folder and nothing else). I create "shortcuts" to programs by adding entries like "o.exe", "m.exe", etc. to the App Paths registry key. Not only does "Win+R, m, Enter" make for a quicker program launch than navigating through groups/sub-menus, but it also doesn’t create small files that FAT would bloat.

    Now if you are wondering why I would still be using FAT rather than NTFS, it’s because I like to be able to access my data. I don’t know how Windows XP handles it, because I don’t own it, but in Windows 2000 there does not appear to be any way at all to access data on an NTFS hard disk if for whatever reason the OS fails to boot. (Admittedly, there is one way: connect the hard disk to another computer. But (a) not many casual users will be able to do this, and (b) it is often not possible when you do not <em>have</em> a second non-laptop computer that runs an NTFS-enabled OS).

  18. Raymond Chen says:

    Why create little files to represent shortcuts on the Start menu? Because it would haven been even wackier if shortcuts on the Start menu were of one form, but shortcuts you created manually in some folder on your machine were of some totally different form. Then people would Curse Microsoft for having two completely different ways of doing things based on some random criterion like whether it’s on the Start menu or in a regular folder.

    And don’t forget corporate deployment. Suppose you’re a major corporation with 10,000 employees and you want force five specific icons onto all of their Start menus. How do you do it? If they’re files, then it’s easy: You copy the files. If they’re in some "Start menu database", then great now you have to learn how to access that database – and good luck if the database gets corrupted. And then people will Curse Microsoft for having yet another database format. (Or, if we used a standard database format, Curse Microsoft for loading an entire database engine at boot just to handle your Start menu.)

    Even if we had a cute dialog for editing your Start menu (note: more code, more testing, product delayed even more), that still doesn’t solve the problem of the user opening their Start menu in Explorer and seeing all the double ampersands.

    I’m glad you like your o.exe, m.exe trick. I have to admit it’s pretty neat. But it does mean that you can’t customize those shortcuts since they aren’t shortcuts. No custom "start in", no custom window state, no hotkey…

  19. The big problem I have with keyboard shortcuts is that I keep losing the keyboard shortcut to Explorer (Windows + E). I can’t find a way to resolve this, I have even reinstalled Windows 2000 just to solve this. And within a couple of weeks I managed to lose it again :-(. It must be some application ruining things, but which?

Comments are closed.