Difference between revisions of "Key.put"
Jump to navigation
Jump to search
(Created page with "<c>key.put</c> allows you to enqueue a string, or single character by code point, into the keyboard buffer. == Example == <ms> // Put MiniScript code for a countdown from...") |
|||
Line 1: | Line 1: | ||
− | <c>[[key]].put</c> allows you to enqueue a string, or single character by code point, into the keyboard buffer. | + | <c>[[key]].put</c> allows you to enqueue a string, or single character by code point, into the keyboard buffer used by both the command line and the [[input]] function. |
== Example == | == Example == |
Latest revision as of 20:42, 29 January 2025
key.put
allows you to enqueue a string, or single character by code point, into the keyboard buffer used by both the command line and the input function.
Example
// Put MiniScript code for a countdown from 10 to 1, then print "BOOM!"
key.put "for i in range(10, 1); clear; print i; wait; end for; clear; print ""BOOM!"""
key.put 13 // carriage return
// Put MiniScript code to print "Hello, World!"
key.put "print ""Hello, World!"""
key.put 13 // carriage return
key.put 99 // c
key.put 108 // l
key.put 101 // e
key.put 97 // a
key.put 114 // r