Console_Inkey

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > Console >

Console_Inkey

 

Description

 

Read a keyboard character or mouse event from the console input buffer.

Function will return immediately.

 

Syntax

 

s = Console_Inkey

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

None




 

Remarks

 

Function will return different string length depending on event:

Len

Meaning

0

Nothing in the input buffer

1

A standard keyboard key was pressed

2

An extended keyboard key was pressed. In this case the first char is zero, while the second is the extended keyboard code.

 

Position

Type

1

Zero

2

Extended keyboard code

 

3

A mouse event occurred. Right char will represent the mouse event while first and second char will report mouse position

 

Position

Type

1

X position

2

Y position

3

Mouse event. See console equates.

 

 

 

 

Restrictions

 

If Console option "Quick Edit Mode" is active

 

See also

 

Examples