IVsUIShell.TranslateAcceleratorAsACmd Method
Causes the environment to use the active key binding table to convert, if possible, a keyboard message into the appropriate command, then route the command using the usual command routing mechanism.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function TranslateAcceleratorAsACmd ( _
pMsg As MSG() _
) As Integer
int TranslateAcceleratorAsACmd(
MSG[] pMsg
)
int TranslateAcceleratorAsACmd(
[InAttribute] array<MSG>^ pMsg
)
abstract TranslateAcceleratorAsACmd :
pMsg:MSG[] -> int
function TranslateAcceleratorAsACmd(
pMsg : MSG[]
) : int
Parameters
pMsg
Type: array<Microsoft.VisualStudio.OLE.Interop.MSG[][in] Pointer to a message structure.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsUIShell::TranslateAcceleratorAsACmd(
[in] LPMSG pMsg
);
This method is intended to be called by in-place components in their implementation of TranslateCntrAccelerator. This makes it possible for the in-place component to give priority for keystrokes to the usual command bindings of the environment before making it possible for them to be handled by a nested OLE object.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.