DMG$Get_Key

DMG ››
Parent Previous Next

DMG$Get_Key

Get next keystroke.


Parse the next keystroke from an input string.


Format

DMG_Get_Key input result length


Parameters

input

A pointer to an SRB that points to the input string to get the next keystroke from.


result

A pointer to an SRB that points to the buffer to receive the keystroke. This should be large enough to contain any key name that the service might return. The length of the SRB indicates the maximum length, in bytes, of the buffer the SRB points to. On return, the length is updated to the number of bytes returned, which will never be larger than the length passed. If the buffer is too small, as much is returned as allowed by the size of the buffer and the SS_BUFFEROVF warning is returned. If 0 is passed, no result is returned.


length

Pointer to a 64-bit integer to receive the length of the escape sequence or UTF-8 characters for the returned result. If 0 is passed, no length is returned.


Description

DMG_Get_Key returns the next key press from the input string. If the key corresponds to a character, that single character is returned. If the key is a non-character key (such as PAGE DOWN) indicated by an escape code, the name of the key is returned. The following standard special keys can be returned by this service:


DELETE

DOWN

END

F0

F1

F2

F3

F4

F5

F6

F7

F8

F9

F10

F11

F12

F13

F14

F15

F16

F17

F18

F19

F20

HOME

INSERT

LEFT

PAGEDOWN

PAGEUP

PF1

PF2

PF3

PF4

RIGHT

SELECT

UP


Not all keyboards have all of these keys and some OEM keyboards may return additional key names.


Condition codes returned:

Code

Meaning

SS_BUFFEROVF

indicates that the result was larger than the provided buffer

SS_NORMAL

Successful completion.