1 /* $OpenBSD: wsdisplay_usl_io.h,v 1.4 2016/04/24 17:30:31 matthieu Exp $ */ 2 /* $NetBSD: wsdisplay_usl_io.h,v 1.1 1998/06/11 22:00:04 drochner Exp $ */ 3 4 #define VT_OPENQRY _IOR('v', 1, int) 5 #define VT_SETMODE _IOW('v', 2, vtmode_t) 6 #define VT_GETMODE _IOR('v', 3, vtmode_t) 7 8 struct vt_mode { 9 char mode; 10 #define VT_AUTO 0 /* switching controlled by drvr */ 11 #define VT_PROCESS 1 /* switching controlled by prog */ 12 13 char waitv; /* not implemented yet SOS */ 14 short relsig; 15 short acqsig; 16 short frsig; /* not implemented yet SOS */ 17 }; 18 19 typedef struct vt_mode vtmode_t; 20 21 #define VT_RELDISP _IO('v', 4 /*, int */) 22 #define VT_FALSE 0 /* release of VT refused */ 23 #define VT_TRUE 1 /* VT released */ 24 #define VT_ACKACQ 2 /* acknowledging VT acquisition */ 25 26 #define VT_ACTIVATE _IO('v', 5 /*, int */) 27 #define VT_WAITACTIVE _IO('v', 6 /*, int */) 28 #define VT_GETACTIVE _IOR('v', 7, int) 29 30 #define VT_GETSTATE _IOR('v', 100, struct vt_stat) 31 struct vt_stat { 32 unsigned short v_active; /* active vt */ 33 unsigned short v_signal; /* signal to send */ 34 unsigned short v_state; /* vt bitmask */ 35 }; 36 37 #define KDGETKBENT _IOWR('K', 4, struct kbentry) 38 struct kbentry { 39 unchar kb_table; /* which table to use */ 40 unchar kb_index; /* which entry in table */ 41 ushort kb_value; /* value to get/set in table */ 42 }; 43 44 #define KDGKBMODE _IOR('K', 6, int) /* get keyboard mode */ 45 46 #define KDSKBMODE _IO('K', 7 /*, int */) /* set keyboard mode */ 47 #define K_RAW 0 /* kbd switched to raw mode */ 48 #define K_XLATE 1 /* kbd switched to "normal" mode */ 49 50 #define KDMKTONE _IO('K', 8 /*, int */) 51 52 #define KDSETMODE _IO('K', 10 /*, int */) 53 #define KD_TEXT 0 /* set text mode restore fonts */ 54 #define KD_GRAPHICS 1 /* set graphics mode */ 55 56 #define KDENABIO _IO('K', 60) /* only allowed if euid == 0 */ 57 #define KDDISABIO _IO('K', 61) 58 59 #define KDGKBTYPE _IOR('K', 64, char) 60 #define KB_84 1 61 #define KB_101 2 62 #define KB_OTHER 3 63 64 #define KDGETLED _IOR('K', 65, int) 65 #define KDSETLED _IO('K', 66 /*, int */) 66 #define LED_CAP 1 67 #define LED_NUM 2 68 #define LED_SCR 4 69 70 #define KDSETRAD _IO('K', 67 /*, int */) 71