home *** CD-ROM | disk | FTP | other *** search
- /*
- ** SCANCODE.CB 1991 by Matt Hart
- **
- ** This macro will show the ascii and scan code of a pressed key or
- ** key combination.
- /*
-
-
- void scancode()
- {
- int key,ascii,scan;
- keyboard_flush();
- message ("Press a key or key combination now");
- while (! inq_kbd_char());
- key = read_char();
- ascii = key & 0xff;
-
- if (ascii == 0)
- {
- scan = key / 0xff;
- message ("Scan code is %d",scan);
- }
- else
- {
- message ("Ascii code is %d",ascii);
- }
- }
-