| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: next . |
Hello David,
On Feb 28 05:38 96, David Muir of 1:259/423 wrote:
MS>> set the keyboard into binary mode. (IMO Ctrl-C is also NOT
MS>> recoginzed).
DM> True, but I can intercept that one in my CRT unit. The
DM> CTRL-P is the one I really want to catch.
DM> Thanks for the sample...
DM> I suppose I should have specified that I want to trap these
DM> keystrokes in a windowed OS/2 session and the SetKbdStatus
DM> does not work in that environment. Any hints?
??? What is NOT working ????
I've again compiled a small test sample (pasted from MicroSoft QH for OS/2
1.3) and compiled with VACPP. started in a Windowed session
rc=0
rc=0
rc=0
rc=0
> Ctrl-P
rc=16
so, WHAT is not working ? Have you really tested my code. i can't believe it.
#define INCL_KBD
#include
#include
#include
main(int argc, char *argv[], char *envp[])
{
APIRET rc=0;
HKBD hkbd=0;
// rc=KbdOpen(&hkbd); // whatever you want....
printf("rc=%d\n",rc);
rc=KbdGetFocus(IO_WAIT, hkbd);
printf("rc=%d\n",rc);
KBDINFO kbstInfo;
kbstInfo.cb = sizeof(kbstInfo);
rc=KbdGetStatus(&kbstInfo, 0); /* gets current status */
printf("rc=%d\n",rc);
kbstInfo.fsMask =
(kbstInfo.fsMask & 0x00F7) /* masks out ASCII mode */
| 0x0004; /* OR into binary mode */
rc=KbdSetStatus(&kbstInfo, 0); /* sets new status */
printf("rc=%d\n",rc);
rc=getch();
printf("rc=%d\n",rc);
return 0;
}
WARPED!, Mario
--- Msgedsq/2 2.2e
* Origin: LC/32 Development Team-Vienna-Austria (2:310/14.11)SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809 @PATH: 310/14 1 24/999 2/777 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.