Mail Archives: djgpp/1998/07/06/08:54:19
new6ie AT aol DOT com writes:
> I'm writing a dos program with allegro's keyboard handler
> installed. I'd like for my program to be able to send the
> Alt+Esc keycode so as to minimize my full screen dos program
> to the win95 taskbar. I wrote a quick program (and ran it
> under dos 6.22) to get the keycode for Alt+Esc and found it
> to be "256", so I tried simulate_keypress(256); but as you
> can guess it didn't work. Where did I go astray?
The simulate_keypress() function adds an entry to the Allegro
keyboard buffer, but this has nothing to do with the win95
input handling mechanism. I'm not aware of any way for a DOS
program to fake keypresses that far up the chain, because
win95 processes these events many levels higher than anything
that your program has access to. There may be some special
API functions that you can use to minimise your program (look
in the Interrupt List), but I have no experience of that.
Shawn Hargreaves.
- Raw text -