Updated 2016-02-13 08:21:19 by pooryorick

"Escape-A", for example, is
    send \033A

"Control-c", for example, is
    send \003

http://expect.sourceforge.net/FAQ.html#q54, http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?ASCII+character+table

See also "How Expect sees function keys".

Helmut Giese mentions that "[t]o go from an arbitrary ASCII character (say X) to its 'control' code (Ctrl X) just do
    set ctrl [expr ($char & 01xF)]


PYK 2016-02-13: To derive the ASCII control character from the common notation for control characters, twiddle the bits on the corresponding printing character, e.g. "X":
set char X
set ctrl [expr {[scan $char %x] & 0x1F}]