Rev | Line | |
---|
[5024] | 1 | #include <stdio.h>
|
---|
| 2 | #include <stdlib.h>
|
---|
| 3 | #include <string.h>
|
---|
| 4 | #define INCL_DOS
|
---|
| 5 | #define INCL_WIN
|
---|
| 6 | #define INCL_BASE
|
---|
| 7 | #include <os2.h>
|
---|
| 8 | #include "vio32.h"
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | void main(int argc, char **argv){
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | vio32Open();
|
---|
| 15 | kbd32SetMode(KBD32MODE_ENABLEMOUSE);
|
---|
| 16 |
|
---|
| 17 | printf("\n");
|
---|
| 18 | VIO32STATUSINFO status;
|
---|
| 19 | KBD32KEYINFO key;
|
---|
| 20 | while(1){
|
---|
| 21 | BOOL ret = kbd32GetKey(&key,2000);
|
---|
| 22 | if (ret==0){
|
---|
| 23 | kbd32GetKeyStatus(&status);
|
---|
| 24 | // for(int i=0;i<79;i++)
|
---|
| 25 | // if( KBD32_CHECKKEY(status,i)) printf("1");
|
---|
| 26 | // else printf("0");
|
---|
| 27 | printf("%08x%08x%08x%08x",status.status[0],status.status[1],status.status[2],status.status[3]);
|
---|
| 28 | printf("%08x%08x%08x%08x%08x\n",status.status[4],status.status[5],status.status[6],status.status[7],status.status[8]);
|
---|
| 29 |
|
---|
| 30 | } else DosSleep(100);
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | vio32Close();
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.