This documentation is archived and is not being maintained.

IVsWindowPane.TranslateAccelerator Method

Handles the translation of special navigation keys.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int TranslateAccelerator(
	MSG[] lpmsg


Type: Microsoft.VisualStudio.OLE.Interop.MSG[]
[in] Keyboard character or character combination to be handled.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell.idl:

HRESULT IVsWindowPane::TranslateAccelerator(
   LPMSG lpmsg

This method is identical to the TranslateAccelerator. This provides you the opportunity to handle keyboard messages before they are dispatched to the window that has focus. For example, your window might have controls where the TAB key navigates from one to the next. To handle the TAB key properly, you need to intercept it before it is dispatched to the window. Often, there is no requirement to implement this method.