User Tools

Site Tools


inserting_20characters_20into_20the_20keyboard_20buffer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

inserting_20characters_20into_20the_20keyboard_20buffer [2018/03/31 13:19]
127.0.0.1 external edit
inserting_20characters_20into_20the_20keyboard_20buffer [2018/04/16 14:18] (current)
richardrussell Added syntax highlighting
Line 1: Line 1:
 =====Inserting characters into the keyboard buffer===== =====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:\\ \\ +//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         *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:\\ \\ + 
 +//BBC BASIC for Windows// doesn'​t have a directly equivalent command, but you can achieve the same effect using the following procedure: 
 + 
 +<code bb4w>
         DEF PROCfx138(C%)         DEF PROCfx138(C%)
         WM_CHAR = 258         WM_CHAR = 258
         SYS "​PostMessage",​ @hwnd%, WM_CHAR, C%, 0         SYS "​PostMessage",​ @hwnd%, WM_CHAR, C%, 0
         ENDPROC         ENDPROC
-So to insert the character "​R"​ into the keyboard buffer you would do:\\ \\ +</​code> ​        
 +         
 +So to insert the character "​R"​ into the keyboard buffer you would do: 
 + 
 +<code bb4w>
         PROCfx138(82)         PROCfx138(82)
-or, equivalently,​\\ \\ +</​code>​ 
 + 
 +or, equivalently,​ 
 + 
 +<code bb4w>
         PROCfx138(ASC("​R"​))         PROCfx138(ASC("​R"​))
 +</​code>​
inserting_20characters_20into_20the_20keyboard_20buffer.txt · Last modified: 2018/04/16 14:18 by richardrussell