Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ucsfcgl!cca.ucsf.edu!wet!tempest From: tempest@wet.UUCP (Ken Lui) Newsgroups: comp.sys.mac Subject: Re: control characters in terminal emulation progs Keywords: Red Ryder 10.3, VersaTerm 4.0 Message-ID: <224@wet.UUCP> Date: 30 Jun 89 20:52:51 GMT References: <14666@ut-emx.UUCP> Reply-To: tempest@wet.UUCP (Ken Lui) Organization: Wetware Diversions, San Francisco Lines: 70 In article <14666@ut-emx.UUCP> jay@ut-emx.UUCP (Jay Boisseau) writes: >When I try to type a ctrl-f (forward-one-character), or most any other >ctrl character, everything is OK. But when I try to type ctrl-@, or any >of the ctrl characters involving a number key or shifted number key, I >get the number entered into my text (whether I used shift or not). I am >using emacs, and have tried this with both RR 10.3 and VersaTerm 4.0. >For example, to set the mark, the command is ctrl-@ (ctrl-shift-2). This >works fine on the GraphOn 225 I am currently using, but on my Mac is >enters a '2' into the text, and nothing else. > It is a keyboard mapping problem. I don't know of a way to get a chr(0) out of the keyboard without using a specific program to do it. You can, however, get a Control-^ using the most recent version of ResEdit. This is the way I do it: 1. Open a copy of the System file 2. Open the KCHR resource. You should see one labeled "US" for domestic units. Open it; its ID should be 0. 3. If you press the Control key, if you have an ADB keyboard, the keyboard template would change. You'll see valid what the key combinations of Control-A, and so on would give you. The Table list would change from 0 (default), to 7. I have an SE and am using System 6.0.2. 4. To change a Control-6 to give you Control-^, select the 2nd to the last square of the 2nd column from the left of the ASCII keys matrix. _________________________________________________ | Table | | ASCII key- list | | keys board | | matrix matrix | | | | | | Keyboard facsimile | |_______________________________________________| Drag the square to where the 6 is on the keyboard facsimile. 5. Quit ResEdit and answer YES when the dialog box comes up. Alternatively, you can create another Table that is used only when Control-Shift is pressed. What you need to do is to select the table that's associated with the Control key by clicking on it in the Table list. Go to the KCHR menu and select Duplicate Table (you won't have to re-enter all those control keys later on). Change Control-Shift-6 to reflect its ASCII counterpart. That's it. Unfortunately, if you assign ASCII "0" to Control-Shift-2 or Control-2, pressing it on the Mac keyboard will get you NOTHING! It really gives you a "NUL" key. I haven't found any way to get ASCII "0" to come out by using the KCHR resource. Another gotcha with this "fix" is that I haven't tried it on a Mac without a Control key. I hope this helps a little bit. If anybody out there in Netland knows how to get an ASCII "0" from the keyboard by using the KCHR resource, do tell. Ken -- _____________________________________________________________________________ Kenneth K.F. Lui | UUCP: ...{ucsfcca|claris}!wet!tempest tempest@wet.UUCP | Internet: cca.ucsf.edu!wet!tempest@cgl.ucsf.edu | -or- claris!wet!tempest@ames.arc.nasa.gov