다음을 통해 공유


TUI Keyboard Hotkeys (Windows CE 5.0)

Send Feedback

The TUI application uses hotkeys to represent different opportunities for hardware input. For example, the application generates a hotkey, WM_HOTKEY, message when the user lifts the handset and causes the phone to go off-hook.

You can integrate custom hardware, including buttons or other user interface hardware, by creating and firing hotkey constants and defining associated actions when these hotkey messages are received.

The hotkey constants as well as keyboard equivalents (relevant when using the TUI on a device that has a keyboard, like a CEPC or emulator instance) are defined in %_WINCEROOT%\Public\VoIP\OAK\Phone\TUI\Inc\Hotkeys.h.

The mapping between each hotkey constant and the functionality executed is accomplished in the c_HotkeyHandlers array, defined in the VoIPApp.cpp file in %_WINCEROOT%\Public\VoIP\OAK\Phone\TUI\App.

This array contains the following information for each hotkey, in sequential order:

  • A numerical identifier.

  • The hotkey constant, defined in Hotkeys.h.

  • A constant that indicates whether the TUI should notify your code only when the key is pressed (PRESSHOLD_ONLY) or when the key is pressed and released (PRESSHOLD_ANDUP).

    These settings only have an effect when a key is pressed and held for a nonnegligible amount of time; if a key is pressed and released quickly, the TUI notifies your code both when the key is pressed and when it is released, regardless of this setting.

  • The method to call when this key is pressed.

Any method specified in the fourth column must have the following function prototype:

HRESULT <methodname> (UINT keycode, BOOL fKeyup)

The keycode parameter contains the hotkey constant from Hotkeys.h that caused the method to be called. The fKeyup parameter is TRUE when the key is being released and FALSE when the key is being pressed.

The method should return an HRESULT constant that indicates success or failure.

For a summary of the PC keyboard equivalents for the default hotkeys, see TUI Hardware Requirements and PC Keyboard Hotkeys.

For more information about how hotkeys are registered and used by the application, see Handling TUI User Input.

See Also

Examining the TUI Implementation

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.