1 /* SCCS Id: @(#)pckeys.c 3.4 1996/05/11 */
2 /* Copyright (c) NetHack PC Development Team 1996 */
3 /* NetHack may be freely redistributed. See license for details. */
6 * MSDOS tile-specific key handling.
16 boolean FDECL(pckeys, (unsigned char, unsigned char));
18 extern struct WinDesc *wins[MAXWIN]; /* from wintty.c */
19 extern boolean inmap; /* from video.c */
21 #define SHIFT (0x1 | 0x2)
26 * Check for special interface manipulation keys.
27 * Returns TRUE if the scan code triggered something.
31 pckeys(scancode, shift)
32 unsigned char scancode;
35 boolean opening_dialog;
37 opening_dialog = pl_character[0] ? FALSE : TRUE;
38 # ifdef SIMULATE_CURSOR
40 case 0x3d: /* F3 = toggle cursor type */
43 if (cursor_type >= NUM_CURSOR_TYPES) cursor_type = 0;
47 case 0x74: /* Control-right_arrow = scroll horizontal to right */
48 if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
52 case 0x73: /* Control-left_arrow = scroll horizontal to left */
53 if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
56 case 0x3E: /* F4 = toggle overview mode */
57 if (iflags.tile_view &&
60 && !Is_rogue_level(&u.uz)
63 iflags.traditional_view = FALSE;
64 vga_overview(iflags.over_view ? FALSE : TRUE);
68 case 0x3F: /* F5 = toggle traditional mode */
69 if (iflags.tile_view &&
72 && !Is_rogue_level(&u.uz)
75 iflags.over_view = FALSE;
76 vga_traditional(iflags.traditional_view ? FALSE : TRUE);
85 # endif /* USE_TILES */