Why can't I use the Escape Key as shortcut?

Hello people, how are you I hope fine.

I'm trying to set the Espace key (char 27) as a shortkey in a ToolStripMenuItem in the Visual Studio 2005, through the Shortcutkey property.

But the VS says that: "The value of argument 'value' (27) is invalid for Enum type 'Keys'. Parameter name: value"

Is this a bug Or is it not possible to do

Thanks

Andre


Answer this question

Why can't I use the Escape Key as shortcut?

  • VoiceOfExperience

    I had the same error too..
    I think we cant do that : )


  • timlshu

    I think this is by design, try assign a shortcut of just 'A". It also fails.

    However, I think that a better error message should be displayed, rather than just the default InvalidEnumArgumentException message.

    Perhaps report a suggestion on the Microsoft Product Feedback Center.

  • M Eifflaender

    I saw the post about it being by design. I think this issue wasn't evaluted well enough. There are 2 issues here. It's easy to workaround the 1st issue by trapping the escape key.
    But that is not all of it. The 2nd issue is the display of the ESC. How do we display 'ESC' in the toolstrip   The nice right justified display of the ESC (and PgUp, PgDn, etc.) is all we want. Tongue Tied




  • Why can't I use the Escape Key as shortcut?