[comp.sys.ibm.pc] capturing NUMLOCK key

tslee@oracle.uucp (Terry Lee) (01/06/90)

This is probably an often asked question but.... ;-)

How does one cause the NUMLOCK (or other 'edit' keys, for that matter) to
be passed to DOS programs as though they were regular keys?

Thanks
Terry Lee
uunet!oracle!tslee
tslee@oracle.com

darcy@druid.uucp (D'Arcy J.M. Cain) (01/07/90)

In article <1990Jan6.031851.5374@oracle.com> tslee@oracle.uucp (Terry Lee) writes:
>This is probably an often asked question but.... ;-)
>
>How does one cause the NUMLOCK (or other 'edit' keys, for that matter) to
>be passed to DOS programs as though they were regular keys?
>
>Thanks
>Terry Lee
>uunet!oracle!tslee
>tslee@oracle.com

Consider finding some other way to do whatever it is that you want to do.  To
do what you describe requires a routine that hooks into the keyboard interupt
and does all the general keyboard handling.  This is not a trivial task.

Perhaps you should tell us what the problem is that you are trying to solve.
there may be a better way to solve the specific problem you have.

BTW There is a BIG difference between the NUMLOCK key and "other 'edit' keys"
and reading the others is quite a lot easier.  NUMLOCK is like the shift and
control keys and is not made available to your program as a key stroke.

Another BTW:  If all you want is the current state of the NUMLOCK, service
2 of int 0x16 (get shift status) will tell you that.  Again try to specify
the exact problem you are trying to solve and you will probably get an exact
answer.  Also tell us what language you are using as it may make a difference.

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Thank goodness we don't get all 
D'Arcy Cain Consulting             |   the government we pay for.
West Hill, Ontario, Canada         |
No disclaimers.  I agree with me   |