PathEngine home previous: iTestBed::printTextLine()next: iTestBed::releaseMesh()
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

While there is an event queued, a pointer to a C string describing the event.
This string must not be deleted.

When there are no events queued, a null pointer is returned.

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().


Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iTestBed::releaseMesh()