StrAppendCharCode

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Syntax:

StrAppendCharCode str:stringID DXScanCode:long isShiftPressed:short

Appends the character represented by DXScanCode to str. If shift is pressed, you should set isShiftPressed to 1, otherwise it should be 0.

Example:

long scancode
short shift

long str


set scancode to GetKeyPress
set shift to IsKeyPressed2 42 ; scancode of left shift
set str to StrNew "Key pressed = "
StrAppendcharCode str scancode shift
StrPrint str

This should print "Key pressed = u" if the u key is pressed but left shift isn't.