| BOOL SetMappedKey( |
| |
UINT nMappedKey, |
|
| |
LPCTSTR lpszKeyBuffer |
|
| ); |
The SetMappedKey method maps an escape sequence to the
specified key.
Parameters
- nMappedKey
- The key which is an index into the display key mapping table.
This defines the values returned by special (method) keys for the
current emulation.
- lpszKeyBuffer
- Pointer to a string which defines the sequence
of characters that are to be mapped to the specified key. Passing
an empty string or NULL pointer will delete the current sequence
mapped to the key and restore the default value, if one has been
defined.
Return Value
If the method succeeds, the return value is non-zero and the
escape sequence is mapped to the specified key. If the key value is
invalid or could not be mapped, then the method will return zero.
Remarks
The SetMappedKey method maps an escape sequence to a
special key. This method can be used to specify 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 method key). There are a number of default sequences that are
mapped to the method and cursor keys, based on the current emulation.
Calling this method will override the default sequence for a key, if
one has been defined.
The following special keys are defined:
| Value |
Description |
| NVT_F1 |
F1 method key |
| NVT_F2 |
F2 method key |
| NVT_F3 |
F3 method key |
| NVT_F4 |
F4 method key |
| NVT_F5 |
F5 method key |
| NVT_F6 |
F6 method key |
| NVT_F7 |
F7 method key |
| NVT_F8 |
F8 method key |
| NVT_F9 |
F9 method key |
| NVT_F10 |
F10 method key |
| NVT_F11 |
F11 method key |
| NVT_F12 |
F12 method key |
| NVT_SF1 |
Shift F1 method key |
| NVT_SF2 |
Shift F2 method key |
| NVT_SF3 |
Shift F3 method key |
| NVT_SF4 |
Shift F4 method key |
| NVT_SF5 |
Shift F5 method key |
| NVT_SF6 |
Shift F6 method key |
| NVT_SF7 |
Shift F7 method key |
| NVT_SF8 |
Shift F8 method key |
| NVT_SF9 |
Shift F9 method key |
| NVT_SF10 |
Shift F10 method key |
| NVT_SF11 |
Shift F11 method key |
| NVT_SF12 |
Shift F12 method key |
| NVT_ENTER |
Enter key |
| NVT_ERASE |
Backspace key |
| NVT_UP |
Cursor up key |
| NVT_DOWN |
Cursor down key |
| NVT_LEFT |
Cursor left key |
| NVT_RIGHT |
Cursor right key |
| NVT_INSERT |
Insert key |
| NVT_DELETE |
Delete key |
| NVT_HOME |
Home key |
| NVT_END |
End key |
| NVT_PGUP |
Page up key |
| NVT_PGDN |
Page down key |
| NVT_APPUP |
Up arrow key |
| NVT_APPDOWN |
Down arrow key |
| NVT_APPLEFT |
Left arrow key |
| NVT_APPRIGHT |
Right arrow key |
| NVT_APPENTER |
Keypad enter key |
| NVT_KEYPAD0 |
Numeric keypad 0 |
| NVT_KEYPAD1 |
Numeric keypad 1 |
| NVT_KEYPAD2 |
Numeric keypad 2 |
| NVT_KEYPAD3 |
Numeric keypad 3 |
| NVT_KEYPAD4 |
Numeric keypad 4 |
| NVT_KEYPAD5 |
Numeric keypad 5 |
| NVT_KEYPAD6 |
Numeric keypad 6 |
| NVT_KEYPAD7 |
Numeric keypad 7 |
| NVT_KEYPAD8 |
Numeric keypad 8 |
| NVT_KEYPAD9 |
Numeric keypad 9 |
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csnvtv12.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
|