# IRsAcceleratorHandlerManager Struct Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | ProcessMessage ([in] MSG *pMessage)
HRESULT | AddHandler ([in] IRsAcceleratorHandler *pHandler)
HRESULT | RemoveHandler ([in] IRsAcceleratorHandler *pHandler)
HRESULT | GetHandlerCount ([out, retval] RtDWORD *dwCount)
HRESULT | GetHandler ([in] RtDWORD dwIndex,[out, retval] IRsAcceleratorHandler **pHandler)
HRESULT | KeynameToVKey ([in] BSTR bsName,[out, retval] RtDWORD *pdwVKey)
HRESULT | VKeyToKeyname ([in] RtDWORD dwVKey,[out, retval] BSTR *pdwName)
HRESULT | AcceleratorSequenceToVKey ([in] BSTR bsAccSeq,[out] RtDWORD *pdwVKey,[out] RtDWORD *pdwModifiers)
HRESULT | VKeyToAcceleratorSequence ([in] RtDWORD dwVKey,[in] RtDWORD dwModifiers,[out, retval] BSTR *pbsAccSeq)
HRESULT | Enable ()
| Enable handling of the accelerators. Handler is enabled by default after creation.
HRESULT | Disable ()
| Disable handling of the accelerators (List of accelerators remains valid).
HRESULT | RedirectToHandler ([in] IRsAcceleratorHandler *pHandler)
HRESULT | ResetRedirectToHandler ()
| Remove the forced redirect handler and continue with normal processing.

## Detailed Description

IRsAcceleratorHandlerManager handles the accelerator key press and sends it to all registered AcceleratorHandlers.

## Member Function Documentation

HRESULT IRsAcceleratorHandlerManager::ProcessMessage | ( | [in] MSG * | pMessage | ) |

Process the message. Only keyboard related messages are passed to the handlers. Accelerator handlers process the message on the Last-Added-First-Served basis. Return S_OK if message was handled. Return S_FALSE if message was not handled. Return error code if any handler failed completely.

WARNING - Accelerators are processed inside mouse events. You are not allowed to access graph during processing.

- The processing should be as short as possible. If you require longer processing you have to post a command or perform another way of asyncrhonous processing.

HRESULT IRsAcceleratorHandlerManager::AddHandler | ( | [in] IRsAcceleratorHandler * | pHandler | ) |

Add new accelerator handler:

Parameters:

  | pHandler | [in] .

HRESULT IRsAcceleratorHandlerManager::RemoveHandler | ( | [in] IRsAcceleratorHandler * | pHandler | ) |

Remove the accelerator handler:

Parameters:

  | pHandler | [in] .

HRESULT IRsAcceleratorHandlerManager::GetHandlerCount | ( | [out, retval] RtDWORD * | dwCount | ) |

Get accelerator handler count:

Returns:
  dwCount [out, retval] .

HRESULT IRsAcceleratorHandlerManager::GetHandler | ( | [in] RtDWORD | dwIndex,
|  | [out, retval] IRsAcceleratorHandler ** | pHandler |
| ) |  |  |

Get the accelerator handler at given index:

Parameters:

  | dwIndex | [in] Index of the accelerator handler.

Returns:
  pHandler [out, retval] Returns the accelerator handler.

HRESULT IRsAcceleratorHandlerManager::KeynameToVKey | ( | [in] BSTR | bsName,
|  | [out, retval] RtDWORD * | pdwVKey |
| ) |  |  |

Key name to VKey conversion:

Parameters:

  | bsName | [in] Key name.

Returns:
  pdwVKey [out, retval] Returns the Vkey.

HRESULT IRsAcceleratorHandlerManager::VKeyToKeyname | ( | [in] RtDWORD | dwVKey,
|  | [out, retval] BSTR * | pdwName |
| ) |  |  |

VKey to Key name conversion:

Parameters:

  | dwVKey | [in] Vkey.

Returns:
  pdwName [out, retval] Returns the Key name.

HRESULT IRsAcceleratorHandlerManager::AcceleratorSequenceToVKey | ( | [in] BSTR | bsAccSeq,
|  | [out] RtDWORD * | pdwVKey,
|  | [out] RtDWORD * | pdwModifiers |
| ) |  |  |

Convert accelerator sequence to VKey and modifier flags.
Key sequence is a sequence of strings generated by VKeyToKeyname separated by spaces.

Parameters:

  | bsAccSeq | [in] .
  | pdwVKey | [out] .
  | pdwModifiers | [out] .

HRESULT IRsAcceleratorHandlerManager::VKeyToAcceleratorSequence | ( | [in] RtDWORD | dwVKey,
|  | [in] RtDWORD | dwModifiers,
|  | [out, retval] BSTR * | pbsAccSeq |
| ) |  |  |

Convert VKey and modifier flags to accelerator sequence.
Key sequence is a sequence of strings generated by VKeyToKeyname separated by spaces.

Parameters:

  | dwVKey | [in] .
  | dwModifiers | [in] .
  | pbsAccSeq | [out, retval] .

HRESULT IRsAcceleratorHandlerManager::Enable | ( |  | ) |

Enable handling of the accelerators. Handler is enabled by default after creation.

HRESULT IRsAcceleratorHandlerManager::Disable | ( |  | ) |

Disable handling of the accelerators (List of accelerators remains valid).

HRESULT IRsAcceleratorHandlerManager::RedirectToHandler | ( | [in] IRsAcceleratorHandler * | pHandler | ) |

Force temporary redirect of all messages to given single handler. Enabled flag is ignored.
This should be used for modal dialogs (i.e. shortcut assignment dialog).

Parameters:

  | pHandler | [in] .

HRESULT IRsAcceleratorHandlerManager::ResetRedirectToHandler | ( |  | ) |

Remove the forced redirect handler and continue with normal processing.