info-mac@uw-beaver (info-mac) (10/26/84)
From: Werner Uhrig <CMP.WERNER@UTEXAS-20.ARPA> [ with permission, I repost a reply I received from a fellow-ARPAnaut. I believe that there may be others, who might consider this a gem and learn one or the other new detail. Hope those that find 'nothing new' in it will endure for the benefit of the "rest of us" - no discussion or hype about keyboard-problems is desired or solicited. Werner ] From: SLOAN@WASHINGTON.ARPA Subject: A: MacTERMINAL, EMACS, and ^@ (CMD-SHFT-2) Werner- Glad you got the practical answers to your question; here's the theoretical answer: >> There is no control-~ character in ASCII. The only non alphabetic >> control characters are @,[,\,],^,_ Well, strictly speaking, there are NO control-characters in ASCII. The character codes in [20,7E] (hexadecimal - as are all the numbers that follow) are the printable characters (note the SP character [blank] in the first row, first column (20) and the lack of an entry in the last row, last column (7F)): ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H O J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ The character code 7F is the DEL character. The character codes in [0,1F] are so-called "control characters". They are: NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB EXC FS GS RS US Some intrepid hackers like to generalize from the first terminal they ever used. Others believe that people should memorize this chart and simply remember that "the control key turns off the '60' bits." Most of the time, these strategies work. Sometimes (often) you run across a piece of hardware that treats the mapping from keys to "control characters" slightly differently. My personal strategy is to believe that there is NO STANDARD for mapping key-chords involving Control to ANY particular character, and adapt to terminals as I find them. [very good advice, I believe. Werner] >> Use CMD-space to generate the null (^@ is what you wanted) More accurately, what you want is NUL. MacTerminal sends a NUL on ^SP (lots of other terminals do that, too.) >> Use CMD-6 to get out of Telnet (is this why you wanted CMD-~) AHA! You wanted the character RS. MacTerminal hackers KNEW that you'd want that to get out of Telnet, and optimized it for you (aren't they nice?) Actually, I've always thought of RS as ^^, and have run across terminals that produce it on ^6, but I've never run across anyone who described it at ^~. What terminal were you using before? [it was a Teleray, a 'losing' terminal because of it's quirks in the use of the control-key and ESCAPE-sequences controling the display. has some nice features, also. - Werner] Happy hacking- -Ken Sloan -------