peter@cbmvax.commodore.com (Peter Cherna) (01/22/91)
In article <5764.2798fbf6@nuhub.acs.northeastern.edu> acm_jl@nuhub.acs.northeastern.edu writes: >I am using a string gadget in my program. Well several of them actually. >How can I find out what key(s) a user types. I.e. Return. I understand that >intuition has a pointer in the window structure (I think) that let's one know >the pressed key value (vanilla or raw) but I tried that and it looks >like the string gadget doesn't have a way to view that. Intuition does not have a pointer to the last keystroke, or anything similar. If the user is typing into a string gadget, the keystrokes are consumed by the gadget and used to affect its contents. You do not hear about them directly, though you can examine the string buffer to see what the string contents currently are. If no string gadget is active, you can ask for IntuiMessages of class RAWKEY or VANILLAKEY, which means a message will be sent to you for each appropriate keyboard event. Look in the IntuiMessage->Code field for the keystroke. >Thanks in advance. >JLabelle@lynx.northeastern.edu Peter -- Peter Cherna, Software Engineer, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com My opinions do not necessarily represent the opinions of my employer. "Oh, PIN-compatible! I thought you wanted me to make it IN-compatible!"