i was wondering if there was a way i could make the computer think that the user typed in certain keys like esc. or crtl or something without the user actually typing keys. thanks in advance for any help
nevermind i figured it out...i have a better question though, at what address would i PEEK at to get the value of the buttons pressed that are in teh keyboard buffer
ok, to put a key into the keyboard buffer without the user actually pressing the button you will need to know the scan code of the key and the character of the key. this uses interrupt 15 sub function DE10h. ok they way i did it was
TYPE RegType
AX AS INTEGER
BX AS INTEGER
CX AS INTEGER
DX AS INTEGER
BP AS INTEGER
SI AS INTEGER
DI AS INTEGER
FLAGS AS INTEGER
DS AS INTEGER
ES AS INTEGER
END TYPE
DIM SHARED Regs AS RegType
SUB writekeytobuffer (scancode,char)
Regs.AX=&HDE10
Regs.BH=scancode
Regs.BL=char
CALL INTERRUPT(&H15,Regs,Regs)
END SUB
[\b][\color blue]
if you want to know the exact specifications of the subfunction of the interrupt i used they are
NT 15 - DESQview v2.00+ - "PUSHKEY" - PUT KEY INTO KEYBOARD INPUT STREAM
AX = DE10h
BH = scan code
BL = character
Return: nothing
Notes: a later read will get the keystroke as if it had been typed by the user
multiple pushes are read last-in first-out
if a script exists for the pushed key in the current application, the
script will be executed
early copies of DV 2.00 destroy AX, BX, ES, and DI
SeeAlso: INT 16/AH=05h
ok, to put a key into the keyboard buffer without the user actually pressing the button you will need to know the scan code of the key and the character of the key. this uses interrupt 15 sub function DE10h. ok they way i did it was
TYPE RegType
AX AS INTEGER
BX AS INTEGER
CX AS INTEGER
DX AS INTEGER
BP AS INTEGER
SI AS INTEGER
DI AS INTEGER
FLAGS AS INTEGER
DS AS INTEGER
ES AS INTEGER
END TYPE
DIM SHARED Regs AS RegType
SUB writekeytobuffer (scancode,char)
Regs.AX=&HDE10
Regs.BH=scancode
Regs.BL=char
CALL INTERRUPT(&H15,Regs,Regs)
END SUB [/color blue]
if you want to know the exact specifications of the subfunction of the interrupt i used they are
NT 15 - DESQview v2.00+ - "PUSHKEY" - PUT KEY INTO KEYBOARD INPUT STREAM
AX = DE10h
BH = scan code
BL = character
Return: nothing
Notes: a later read will get the keystroke as if it had been typed by the user
multiple pushes are read last-in first-out
if a script exists for the pushed key in the current application, the
script will be executed
early copies of DV 2.00 destroy AX, BX, ES, and DI
SeeAlso: INT 16/AH=05h
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.