Mail Archives: djgpp/1993/09/09/11:46:28
rda AT uk DOT ac DOT cam DOT eng writes:
> Chris Boucher <C DOT C DOT Boucher AT southampton DOT ac DOT uk> writes:
> >The trick is to look at the keyboard modifiers (INT 16 AH=02) every time
> >you read in a key - if you get a ^H and the control key isn't down then
> >it was backspace.
>
> This works OK most of the time, but it tends to fail in some applications if
> the user types ahead - unless you can guarantee that the application is
> going to read keys immediately you may be OK, but if not, you can end up
> reading the modifiers long _after_ the key was pressed.
>
> Example:
> In Demacs & OEmacs (DOS/WINDOWS/DJGPP versions of GNU Emacs)
[deleted]
> This sort of behaviour is bad IMHO - editors ought to be able to cope with a
> few characters type-ahead.
Yes, I'm aware of this problem (yet another DOS limitation). As a
matter of fact I've just finished rewriting the keyboard handling code
for OEmacs (it can now recognise *many* more keys), but this problem
still exists because, as you point out...
> What is really needed is an INT-09 handler in GO32 which reads the modifiers
> _when the key is pressed_ and buffers keypress events as (say) keycode +
> modifier (+ timestamp ?) for the application (ditto for mouse events).
Agreed, but I think this will have to wait for GO32 1.11.
One thing to note is that any event handler should ideally come *after*
KEYB has done the necessary translations, if not it'll need different
scan code tables for each country (although these are available via the
Xfree86 Xmodmaps).
> I think the current event library could be modified to do this, but I can't
> find any docs for it.
Hmmm, I'll take a look.
Chris.
--
Dr Chris Boucher Tel: (+44 703) 592300
Signal Processing and Control Group Fax: (+44 703) 593033
Institute of Sound and Vibration Research Email: ccb AT soton DOT ac DOT uk
University of Southampton, Southampton S09 5NH, England
- Raw text -