TeamTalk 4 .NET DLL  Version 4.5A
Windows Hotkeys

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

Functions

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

Detailed Description

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 TeamTalk4.HotKey_InstallTestHook() can be used. Once the desired key-combination has been found the function TeamTalk4.HotKey_Register() can be used to register the combination as a hotkey and have the TeamTalk4.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

bool BearWare.TeamTalk4.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 EnableTransmission.

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
nHotKeyIDThe ID of the hotkey to register. It will be passed as the event OnHotKeyToggle when the hotkey becomes either active or inactive.
lpnVKCodesAn 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
bool BearWare.TeamTalk4.HotKey_Unregister ( int  nHotKeyID)

Unregister a registered hotkey.

Parameters
nHotKeyIDis the ID of the hotkey to unregister.
See Also
HotKey_Register
int BearWare.TeamTalk4.HotKey_IsActive ( int  nHotKeyID)

Check whether hotkey is active.

Parameters
nHotKeyIDis the ID of the registered hotkey.
Returns
1 if active, 0 if inactive, -1 if hotkey-ID is invalid
bool BearWare.TeamTalk4.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
bool BearWare.TeamTalk4.HotKey_RemoveTestHook ( )

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

See Also
HotKey_InstallTestHook
bool BearWare.TeamTalk4.HotKey_GetKeyString ( int  nVKCode,
out string  szKeyName 
)

Get a string description of the virtual-key code.

Parameters
nVKCodeThe virtual key code passed in OnHotKeyTest.
szKeyNameWill receive key description in local language.
See Also
HotKey_InstallTestHook