Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!UCBVAX.BERKELEY.EDU!holly%jason From: holly%jason@UCBVAX.BERKELEY.EDU (Holly Heine) Newsgroups: comp.windows.x Subject: (none) Message-ID: <8703161938.AA04634@jason.berkeley.edu> Date: Mon, 16-Mar-87 14:38:10 EST Article-I.D.: jason.8703161938.AA04634 Posted: Mon Mar 16 14:38:10 1987 Date-Received: Tue, 17-Mar-87 04:16:19 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 23 I have been writing programs using the xwindow package available on the sun workstation. In writing a simple window I have uncovered a very annoying problem that I was wondering if anyone knew anything about. The program prompts for user input and uses the XWindowEvent command with the mask set for Keypressed to handle the event. The problem is that every time a key is pressed it generates 2 events. The first is the intended key character and the second "fake" event is an "unprintable" character. This fake eventis then in the event queue so that the next XWindowEvent attempts to use it and causes the program to work improperly. This problem was isolated while running the window problem under dbx. The fake event was of type keypressed. Two events (the intended and the fake) were generated every time a single key was pressed. However if two keys were pressed simultaneously, ie. shift-character, only one event was generated. This simple program works correctly with no extra events if run on the uvax. The program will also work if extra XWindowEvent statements are put in to eat up the fake events, but this is in no means a solution. Has anyone else seen this problem with any of there xwindow programs? Can anyone suggest a solution or some one else to present this problem to? Thank you very much, Holly Heine (holly@jason)