GET_KEY@

Platform

x64, Win32

Purpose

To get the next keycode.

Syntax

SUBROUTINE GET_KEY@(K)
INTEGER (KIND=2) K

Description

This subroutine gets a keycode from the keyboard. If the buffer is not empty then a value is read and removed from the buffer. If the buffer is empty then the function waits for a keyboard input. The value of K assigned such that if the high byte is equal to 0 then the low byte is the ASCII value for the key pressed. If the high byte is equal to 1 then the low byte is the scan code for a Function key or an ALT key combination (the scan code is then K-256).

Example

CALL GET_KEY@(K)
IF(K == Z'13B')THEN
 PRINT *,'F1 Key pressed'
ELSEIF(K == Z'13C')THEN
 :
 :
ENDIF

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited