Key.put

From MiniScript Wiki
Revision as of 20:22, 29 January 2025 by FR-b0n5a1 (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

key.put allows you to enqueue a string, or single character by code point, into the keyboard buffer.

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