PathEngine home previous: iTestBed::printTextLine()next: iTestBed::release()
Contents, API Reference, Interfaces, iTestBed, receiveKeyMessage

iTestBed::receiveKeyMessage()

Description

Used to obtain messages about any keys that went up or down since the last frame.

Syntax

const char* receiveKeyMessage();

Return Value

If there is a key event queued, a pointer to a C string describing the event.
The memory for the return string, in this case, is managed by PathEngine internally, and must not be deleted.

If there is no key event queued, a null pointer.

Remarks

This method is used to obtain messages about any keys that went up or down since the last frame.
(So since the last time iTestBed::update() was called.)
The testbed maintains an internal queue of key press messages.
Each time you call this method, an event is removed from the queue.

See Key Strings for a list of supported key strings.
Up key messages are prepended by the character 'u'. Down key messages are prepended by the character 'd'.

This method is suitable for event driven input.
For example, where pressing a key should cause an action.
To simply check if a key is down, use iTestBed::getKeyState().

C# Mapping

string receiveKeyMessage();

Java Mapping

String receiveKeyMessage();

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iTestBed::release()