TeamTalk 5 Java DLL Version 5.19A

Functions
Windows Hotkeys

This section explains how to setup hot-keys on Windows. More...

## Functions

bool | BearWare.TeamTalkBase.HotKey_Register (int nHotKeyID, int[] lpnVKCodes)
| Register a global hotkey. More...
bool | BearWare.TeamTalkBase.HotKey_Unregister (int nHotKeyID)
| Unregister a registered hotkey. More...
int | BearWare.TeamTalkBase.HotKey_IsActive (int nHotKeyID)
| Check whether hotkey is active. More...
bool | BearWare.TeamTalkBase.HotKey_InstallTestHook ()
| Install a test hook which calls the event OnHotKeyTest whenever a key or mouse button is pressed. More...
bool | BearWare.TeamTalkBase.HotKey_RemoveTestHook ()
| Remove the test hook again so the OnHotKeyTest event will no longer be notified. More...
bool | BearWare.TeamTalkBase.HotKey_GetKeyString (int nVKCode, ref string szKeyName)
| Get a string description of the virtual-key code. More...

## Detailed Description

This section explains how to setup hot-keys on Windows.

Hotkeys can be used to e.g. enable push-to-talk.

Windows supports intercepting key strokes globally, i.e. without having the user application's window focused. To investigate which keys are currently being pressed the function TeamTalkBase.HotKey_InstallTestHook() can be used. Once the desired key-combination has been found the function TeamTalkBase.HotKey_Register() can be used to register the combination as a hotkey and have the TeamTalkBase.OnHotKeyToggle() event posted whenever the key combination becomes active.

Note that it's not advised to have a hotkey installed while debugging an application in Visual Studio. It slows down the debugger dramatically.

## Function Documentation

## ◆ HotKey_Register()

bool BearWare.TeamTalkBase.HotKey_Register | ( | int | nHotKeyID,
|  | int[] | lpnVKCodes
| ) |  |

Register a global hotkey.

When the hotkey becomes active or inactive it will post the event OnHotKeyToggle.

A hotkey can e.g. be used as a push-to-talk key combination. When the hotkey becomes active call EnableVoiceTransmission().

Note that having a hotkey enabled makes the Visual Studio debugger really slow to respond, so when debugging it's best not to have hotkeys enabled.

Parameters

  nHotKeyID | The ID of the hotkey to register. It will be passed as the event OnHotKeyToggle when the hotkey becomes either active or inactive.
  lpnVKCodes | An array of virtual key codes which constitute the hotkey. This document outlines the virtual key codes: http://msdn.microsoft.com/en-us/library/ms645540(VS.85).aspx A hotkey consisting of Left Control+A would have the array consist of [162, 65].

See also
  HotKey_Unregister
  HotKey_InstallTestHook

Definition at line 8142 of file TeamTalk.cs.

## ◆ HotKey_Unregister()

bool BearWare.TeamTalkBase.HotKey_Unregister | ( | int | nHotKeyID | ) |

Unregister a registered hotkey.

Parameters

  nHotKeyID | is the ID of the hotkey to unregister.

See also
  HotKey_Register

Definition at line 8151 of file TeamTalk.cs.

## ◆ HotKey_IsActive()

int BearWare.TeamTalkBase.HotKey_IsActive | ( | int | nHotKeyID | ) |

Check whether hotkey is active.

Parameters

  nHotKeyID | is the ID of the registered hotkey.

Returns
  1 if active, 0 if inactive, -1 if hotkey-ID is invalid

Definition at line 8160 of file TeamTalk.cs.

## ◆ HotKey_InstallTestHook()

bool BearWare.TeamTalkBase.HotKey_InstallTestHook | ( |  | ) |

Install a test hook which calls the event OnHotKeyTest whenever a key or mouse button is pressed.

This can be used to determine a key-combination, like e.g. a push-to-talk key.

See also
  HotKey_RemoveTestHook
  OnHotKeyTest

Definition at line 8173 of file TeamTalk.cs.

## ◆ HotKey_RemoveTestHook()

bool BearWare.TeamTalkBase.HotKey_RemoveTestHook | ( |  | ) |

Remove the test hook again so the OnHotKeyTest event will no longer be notified.

See also
  HotKey_InstallTestHook

Definition at line 8192 of file TeamTalk.cs.

## ◆ HotKey_GetKeyString()

bool BearWare.TeamTalkBase.HotKey_GetKeyString | ( | int | nVKCode,
|  | ref string | szKeyName
| ) |  |

Get a string description of the virtual-key code.

Parameters

  nVKCode | The virtual key code passed in OnHotKeyTest.
  szKeyName | Will receive key description in local language.

See also
  HotKey_InstallTestHook

Definition at line 8202 of file TeamTalk.cs.