Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!cbmvax!carolyn From: carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) Newsgroups: comp.sys.amiga Subject: Re: Modula2 & keyboard Message-ID: <1062@cbmvax.cbmvax.cbm.UUCP> Date: Fri, 5-Dec-86 19:07:32 EST Article-I.D.: cbmvax.1062 Posted: Fri Dec 5 19:07:32 1986 Date-Received: Sat, 6-Dec-86 03:26:32 EST References: <7407@topaz.RUTGERS.EDU> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner) Distribution: world Organization: Commodore Technology, West Chester, PA Lines: 34 In article <7407@topaz.RUTGERS.EDU> lachac@topaz.rutgers.edu.UUCP (Gerard Lachac) writes: > > Im trying to write a program that uses Intuition to handle its input >event. In my Intuition manual, it explains that the Rawkey flag in the >event class, when set, will send you untranslated keycodes from the keyboard. >When you use that, you can see when they use the Amiga keys, the alt keys, >and the function keys. My question is, how do I translate this to an ascii >code? Id like to know what key they're pressing on the keyboard, and that >raw code sure isnt telling me. The manual also refers to a vanillakey >event class, but in TDI Modula-2, the language Im trying to use, there is >no mention of this in the set of IE classes. Any help with this would be >appreciated. If you're doing any serious keyboard IO I suggest attaching a console device to your window instead of using RawKey. The console device will give you all normal keys in ASCII and escape sequences for the cursor, help, function keys. Also gives you ANSI type cursor control, auto-scroll, insert, delete, etc.... If you stick with RawKey, you can either translate them yourself or get the console device to do it for you with the RawKeyConvert function. See the Intuition section of the Enhancer booklet for an example that shows how to use this routine in a manner compatible with foreign keymaps and dead-keys. VANILLAKEY is defined in intuition.h as 0x00200000. If you use this, I think you lose cursor, help, and function key messages. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=