skip to main content

Library Routines : W$KEYBUF

W$KEYBUF
The W$KEYBUF library routine allows to send keycodes to the runtime, simulating the user input.
Note - In order to support every existing character, the routine sends ALT+ascii-code key combinations to the input and therefore it might not work on platforms where ALT+ascii-code combinations are not supported. Also, sending keystrokes while the keyboard is in use (e.g. if keystrokes are sent when the Accept is interrupted by a key combination like CTRL+T and the two keys are still down when the routine is called) might not work.
Syntax:
 CALL "W$KEYBUF" USING opCode 
Parameters:
Return Code:
returnCode can be any signed numeric data item. The meaning depends on the opcode.
Examples:
Example - Send some keystrokes to the standard input
 move "This is an automatic text" to txt-string
 inspect txt-string replacing trailing spaces by low-values
 perform varying i from 1 by 1  
           until txt-string(i:1) = low-value
         call "w$keybuf" using 2, txt-string(i:1
 end-perform.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left