1 /* 2 * PROJECT: ReactOS KDBG Kernel Debugger Terminal Driver 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: KD Terminal Driver public header 5 * COPYRIGHT: Copyright 2023 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> 6 */ 7 8 #pragma once 9 10 #define KEY_BS 8 11 #define KEY_ESC 27 12 #define KEY_DEL 127 13 14 #define KEY_SCAN_UP 72 15 #define KEY_SCAN_DOWN 80 16 17 /* Scan codes of keyboard keys */ 18 #define KEYSC_END 0x004f 19 #define KEYSC_PAGEUP 0x0049 20 #define KEYSC_PAGEDOWN 0x0051 21 #define KEYSC_HOME 0x0047 22 #define KEYSC_ARROWUP 0x0048 // == KEY_SCAN_UP 23 24 25 typedef struct _SIZE 26 { 27 LONG cx; 28 LONG cy; 29 } SIZE, *PSIZE; 30 31 /* KD Controlling Terminal */ 32 33 /* These values MUST be nonzero, they're used as bit masks */ 34 typedef enum _KDB_OUTPUT_SETTINGS 35 { 36 KD_DEBUG_KDSERIAL = 1, 37 KD_DEBUG_KDNOECHO = 2 38 } KDB_OUTPUT_SETTINGS; 39 40 extern ULONG KdbDebugState; 41 extern SIZE KdTermSize; 42 extern BOOLEAN KdTermConnected; 43 extern BOOLEAN KdTermSerial; 44 extern BOOLEAN KdTermReportsSize; 45 46 BOOLEAN 47 KdpInitTerminal(VOID); 48 49 BOOLEAN 50 KdpUpdateTerminalSize( 51 _Out_ PSIZE TermSize); 52 53 VOID 54 KdpFlushTerminalInput(VOID); 55 56 CHAR 57 KdpReadTermKey( 58 _Out_ PULONG ScanCode); 59 60 /* EOF */ 61