inkey (STRING*);

Enters keyboard input into the given string. The local keyboard layout will be activated. The instruction waits for the termination of the input via [Enter] or [Tab] and then proceeds with the calling function, similar to wait. [Esc], [Up], [Down], [PgUp], [PgDn] or [F1]..[F11] abort the entry; the previous content of the string will then be restored, and the scan code of the key will be returned. The text of the input can be edited using [BackSpace], [Del], [Right], [Left], [Home] and [End] .

Parameters:

STRING* - String pointer to receive keyboard entry.

Returns:

1 input terminated because inkey_active was set to OFF or another keyboard entry was active at the same time.
9 input terminated by [Tab]
13 input terminated by [Enter]
27 input terminated by [Esc]
72 input terminated by [Up]
73 input terminated by [PgUp]
80 input terminated by [Down]
81 input terminated by [PgDn]

Modifies:

string String receives keyboard entry.
inkey_active is set to ON during entry.

Remarks:

Example:

STRING* entry_str = "                      "; // long empty string
...
result = inkey(entry_str); // wait until [enter] pressed
if (result == 13) {
  process_entry(entry_str); 
}

See also:

inkey_active, str_cursor, key_a,...,key_z, on_, key_for_string, str_for_key, key_set

► latest version online