From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralph Alvy Subject: Re: KDE Screensaver and Enter key Date: Thu, 13 May 2004 15:03:05 -0700 Sender: linux-msdos-owner@vger.kernel.org Message-ID: References: Mime-Version: 1.0 Content-Transfer-Encoding: 7Bit Return-path: List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-msdos@vger.kernel.org Ralph Alvy wrote: > Bart Oldeman wrote: > >> On Thu, 13 May 2004, Ralph Alvy wrote: >> >>> Ralph Alvy wrote: >>> >>> > I notice that under dosemu 1.2.1, when the KDE 3.2.2 Screensaver is >>> > active, after I type my password and hit Enter, the Enter key is >>> > picked up by dosemu. Is there a way around this? >>> > >>> And this happens also when running dosemu 1.2.1 under Xfce4 with >>> xscreensaver as my screensaver manager. >> >> I've seen it myself while flipping windows with alt-tab, sometimes the >> FreeDOS command.com would pick up the tab and try to do filename >> completion at the prompt [beep!] >> >> What actually happens is that as soon as the xdosemu window becomes >> active it reads the current X keymap, which of the keys are pressed and >> so on. So it finds out that (say) the Enter key is still pressed. It then >> simulates a "press Enter" to DOS so that the release will be processed >> correctly. >> >> This problem is really quite difficult to solve, I don't know how. >> A timeout would be something but then some keys may be missed... >> I tried a couple things around it but it always brought up a new (and >> worse) problem. >> >> An example is having the shift key pressed while your mouse moves to >> the window, then you expect capitals, so a "press shift key" must be >> simulated. Now do the same with ctrl while getting into DOOM... and it is >> used a shooting key. So in general it is difficult to distinguish special >> keys from non-special keys because we don't know what the program wants. >> Anyway I hope you get the idea. >> >> Bart > > I understand. Perhaps a workaround might be to have dosemu lose its focus > after a certain amount of time. This way, since the dosemu window won't be > in focus after the screen saver is dismissed, it won't inherit the final > keypress that dismissed the screen saver. Correction: "after a certain amount of *idle* time"