User Tools

Site Tools


Inserting characters into the keyboard buffer

by Richard Russell, July 2006

On the BBC Microcomputer and some other Acorn computers you could insert a character into the keyboard buffer using the *FX 138 command. For example the following code would insert the character “R” (CHR$82) into the keyboard buffer:

  • FX138,0,82

BBC BASIC for Windows doesn't have a directly equivalent command, but you can achieve the same effect using the following procedure:

        DEF PROCfx138(C%)
        WM_CHAR = 258
        SYS "PostMessage", @hwnd%, WM_CHAR, C%, 0

So to insert the character “R” into the keyboard buffer you would do:


or, equivalently,

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
inserting_20characters_20into_20the_20keyboard_20buffer.txt · Last modified: 2018/04/16 15:18 by richardrussell