MZ-Tools Articles Series: BUG: Command.Bindings causes Exception when setting value from an add-in in localized Visual Studio.

This is another bug that happens in localized versions of Visual Studio when an add-in needs to re-create a command for whatever reason and it tries to preserve the existing command binding:

BUG: Command.Bindings causes Exception when setting value from an add-in in localized Visual Studio.
http://www.mztools.com/articles/2012/MZ2012021.aspx

I have filed a bug through Microsoft Connect:

EnvDTE.Command.Bindings causes Exception when setting value from a Visual Studio add-in
https://connect.microsoft.com/VisualStudio/feedback/details/761838/envdte-command-bindings-causes-exception-when-setting-value-from-a-visual-studio-add-in

And Ryan Molden (VS team) posted a workaround in this thread of the Visual Studio Extensibility forum.

Update (19-OCT-2012): the list of keys to translate with that workaround is the following (these constants are got from Common7IDE1033msenvui.dll):

13358,     “Ctrl”
13359,     “Alt”
13360,     “Shift”
13361,     “Bkspce”
13362,     “Tab”
13363,     “Break”
13364,     “Break”
13365,     “Space”
13366,     “PgUp”
13367,     “PgDn”
13368,     “Home”
13369,     “Ins”
13370,     “Del”

13387,     “Left Arrow”
13388,     “Right Arrow”
13389,     “Up Arrow”
13390,     “Down Arrow”
13391,     “End”
13392,     “Enter”
13393,     “Esc”

Visual Studio 2008 and higher:

13394,     “Clear”