send function keys to a legacy DOS program
Alexander Gattin
xrgtn at yandex.ru
Tue Mar 29 09:59:45 EDT 2011
Hello,
On Sun, Mar 20, 2011 at 06:59:46PM -0700, Justin
Ezequiel wrote:
> On Mar 20, 7:30 am, Alexander Gattin
> <xr... at yandex.ru> wrote:
> > You need to place 2 bytes into the circular buffer
> > to simulate key press. Lower byte is ASCII code,
> > higher byte is scan code (they are the same for
> > functional keys, whe using default keycode set#1):
> >
> > F5: 0x3F 0x3F
> > F2: 0x3C 0x3C
> > F7: 0x41 0x41
I'm not sure regarding the ASCII part. I think it
might need to be set to 0x00 for all functional
keys instead of 0x3F/0x3C/0x41, but probably no
application actually cares.
Another thing is that you may need to send key
release after key press in order for the
application to trigger the F5/F2/F7 event. I'm not
sure what the scan codes for F5/F2/F7 releases
are, but think that they may be:
F5: 0xBF
F2: 0xBC
F7: 0xC1
--
With best regards,
xrgtn
More information about the Python-list
mailing list