* Check for special interface manipulation keys. * Returns TRUE if the scan code triggered something. * */
| 32 | * |
| 33 | */ |
| 34 | boolean |
| 35 | pckeys(unsigned char scancode, unsigned char shift) |
| 36 | { |
| 37 | boolean opening_dialog; |
| 38 | |
| 39 | opening_dialog = svp.pl_character[0] ? FALSE : TRUE; |
| 40 | switch (scancode) { |
| 41 | #ifdef SIMULATE_CURSOR |
| 42 | case 0x3d: /* F3 = toggle cursor type */ |
| 43 | HideCursor(); |
| 44 | cursor_type += 1; |
| 45 | if (cursor_type >= NUM_CURSOR_TYPES) |
| 46 | cursor_type = 0; |
| 47 | DrawCursor(); |
| 48 | break; |
| 49 | #endif |
| 50 | case 0x74: /* Control-right_arrow = scroll horizontal to right */ |
| 51 | if ((shift & CTRL) && iflags.tile_view && !opening_dialog) |
| 52 | userpan(1); |
| 53 | break; |
| 54 | case 0x73: /* Control-left_arrow = scroll horizontal to left */ |
| 55 | if ((shift & CTRL) && iflags.tile_view && !opening_dialog) |
| 56 | userpan(0); |
| 57 | break; |
| 58 | case 0x3E: /* F4 = toggle overview mode */ |
| 59 | if (iflags.tile_view && !opening_dialog && !Is_rogue_level(&u.uz)) { |
| 60 | iflags.traditional_view = FALSE; |
| 61 | overview(iflags.over_view ? FALSE : TRUE); |
| 62 | refresh(); |
| 63 | } |
| 64 | break; |
| 65 | case 0x3F: /* F5 = toggle traditional mode */ |
| 66 | if (iflags.tile_view && !opening_dialog && !Is_rogue_level(&u.uz)) { |
| 67 | iflags.over_view = FALSE; |
| 68 | traditional(iflags.traditional_view ? FALSE : TRUE); |
| 69 | refresh(); |
| 70 | } |
| 71 | break; |
| 72 | default: |
| 73 | return FALSE; |
| 74 | } |
| 75 | return TRUE; |
| 76 | } |
| 77 | |
| 78 | static void |
| 79 | userpan(boolean on) |
no test coverage detected