| |
| BOOL WINAPI NvtGetMappedKey(
|
| |
HDISPLAY hDisplay, |
|
| |
UINT nMappedKey, |
|
| |
LPTSTR lpszKeyBuffer, |
|
| |
UINT cchKeyBuffer |
|
| );
|
The NvtGetMappedKey function returns the escape sequence
mapped to the specified key.
Parameters
- hDisplay
- Handle to the virtual display.
- nMappedKey
- The key which is an index into the display key mapping table.
This defines the values returned by special (function) keys for the
current emulation.
- lpszKeyBuffer
- Address of the buffer which will receive the escape sequence
mapped to the specified key.
- cchKeyBuffer
- The maximum number of characters that may be copied into the
key buffer string, including the terminating null byte.
Return Value
If the function succeeds, the return value is non-zero and the
escape sequence for the mapped key is copied into the specified
buffer. If the key has not been mapped, and there is no default
escape sequence defined, then the function will return zero.
Remarks
The NvtGetMappedKey function returns the escape sequence
that has been mapped to a special key. This function can be used to
determine what sequence of characters should be sent in response to
a keypress (for example, what sequence should be sent to a server
when the user presses the F1 function key). If a sequence has not
been explicitly mapped through a call to NvtSetMappedKey,
the default sequence for the current emulation will be
returned.
Note that the current display mode, such as whether or not the
emulator is in application mode or not, should be considered when
determining which mapped key to use. For example, if the emulator
is not in application mode and the user presses the up-arrow key,
the sequence mapped to the NVT_UP key should be sent to the server.
However, if the emulator is in application mode, the sequence
mapped to the NVT_APPUP key should be sent instead. This is
automatically handled by the NvtTranslateMappedKey function,
so it is recommended that it be used when mapping a virtual
keypress to the appropriate escape sequence.
Requirements
Client: Requires Windows 7, Windows Vista or Windows
XP.
Server: Requires Windows Server 2008 or Windows Server
2003.
Header: Include cstools7.h.
Library: Use csnvtav7.lib.
Unicode: Implemented as Unicode and ANSI versions.
See Also
NvtGetDisplayMode, NvtResetMappedKeys, NvtSetDisplayMode, NvtSetMappedKey, NvtTranslateMappedKey
|
|