0001
0002 #ifndef _UAPI_LINUX_KD_H
0003 #define _UAPI_LINUX_KD_H
0004 #include <linux/types.h>
0005 #include <linux/compiler.h>
0006
0007
0008
0009 #define GIO_FONT 0x4B60
0010 #define PIO_FONT 0x4B61
0011
0012 #define GIO_FONTX 0x4B6B
0013 #define PIO_FONTX 0x4B6C
0014 struct consolefontdesc {
0015 unsigned short charcount;
0016 unsigned short charheight;
0017 char __user *chardata;
0018 };
0019
0020 #define PIO_FONTRESET 0x4B6D
0021
0022 #define GIO_CMAP 0x4B70
0023 #define PIO_CMAP 0x4B71
0024
0025 #define KIOCSOUND 0x4B2F
0026 #define KDMKTONE 0x4B30
0027
0028 #define KDGETLED 0x4B31
0029 #define KDSETLED 0x4B32
0030 #define LED_SCR 0x01
0031 #define LED_NUM 0x02
0032 #define LED_CAP 0x04
0033
0034 #define KDGKBTYPE 0x4B33
0035 #define KB_84 0x01
0036 #define KB_101 0x02
0037 #define KB_OTHER 0x03
0038
0039 #define KDADDIO 0x4B34
0040 #define KDDELIO 0x4B35
0041 #define KDENABIO 0x4B36
0042 #define KDDISABIO 0x4B37
0043
0044 #define KDSETMODE 0x4B3A
0045 #define KD_TEXT 0x00
0046 #define KD_GRAPHICS 0x01
0047 #define KD_TEXT0 0x02
0048 #define KD_TEXT1 0x03
0049 #define KDGETMODE 0x4B3B
0050
0051 #define KDMAPDISP 0x4B3C
0052 #define KDUNMAPDISP 0x4B3D
0053
0054 typedef char scrnmap_t;
0055 #define E_TABSZ 256
0056 #define GIO_SCRNMAP 0x4B40
0057 #define PIO_SCRNMAP 0x4B41
0058 #define GIO_UNISCRNMAP 0x4B69
0059 #define PIO_UNISCRNMAP 0x4B6A
0060
0061 #define GIO_UNIMAP 0x4B66
0062 struct unipair {
0063 unsigned short unicode;
0064 unsigned short fontpos;
0065 };
0066 struct unimapdesc {
0067 unsigned short entry_ct;
0068 struct unipair __user *entries;
0069 };
0070 #define PIO_UNIMAP 0x4B67
0071 #define PIO_UNIMAPCLR 0x4B68
0072 struct unimapinit {
0073 unsigned short advised_hashsize;
0074 unsigned short advised_hashstep;
0075 unsigned short advised_hashlevel;
0076 };
0077
0078 #define UNI_DIRECT_BASE 0xF000
0079 #define UNI_DIRECT_MASK 0x01FF
0080
0081 #define K_RAW 0x00
0082 #define K_XLATE 0x01
0083 #define K_MEDIUMRAW 0x02
0084 #define K_UNICODE 0x03
0085 #define K_OFF 0x04
0086 #define KDGKBMODE 0x4B44
0087 #define KDSKBMODE 0x4B45
0088
0089 #define K_METABIT 0x03
0090 #define K_ESCPREFIX 0x04
0091 #define KDGKBMETA 0x4B62
0092 #define KDSKBMETA 0x4B63
0093
0094 #define K_SCROLLLOCK 0x01
0095 #define K_NUMLOCK 0x02
0096 #define K_CAPSLOCK 0x04
0097 #define KDGKBLED 0x4B64
0098 #define KDSKBLED 0x4B65
0099
0100 struct kbentry {
0101 unsigned char kb_table;
0102 unsigned char kb_index;
0103 unsigned short kb_value;
0104 };
0105 #define K_NORMTAB 0x00
0106 #define K_SHIFTTAB 0x01
0107 #define K_ALTTAB 0x02
0108 #define K_ALTSHIFTTAB 0x03
0109
0110 #define KDGKBENT 0x4B46
0111 #define KDSKBENT 0x4B47
0112
0113 struct kbsentry {
0114 unsigned char kb_func;
0115 unsigned char kb_string[512];
0116 };
0117 #define KDGKBSENT 0x4B48
0118 #define KDSKBSENT 0x4B49
0119
0120 struct kbdiacr {
0121 unsigned char diacr, base, result;
0122 };
0123 struct kbdiacrs {
0124 unsigned int kb_cnt;
0125 struct kbdiacr kbdiacr[256];
0126 };
0127 #define KDGKBDIACR 0x4B4A
0128 #define KDSKBDIACR 0x4B4B
0129
0130 struct kbdiacruc {
0131 unsigned int diacr, base, result;
0132 };
0133 struct kbdiacrsuc {
0134 unsigned int kb_cnt;
0135 struct kbdiacruc kbdiacruc[256];
0136 };
0137 #define KDGKBDIACRUC 0x4BFA
0138 #define KDSKBDIACRUC 0x4BFB
0139
0140 struct kbkeycode {
0141 unsigned int scancode, keycode;
0142 };
0143 #define KDGETKEYCODE 0x4B4C
0144 #define KDSETKEYCODE 0x4B4D
0145
0146 #define KDSIGACCEPT 0x4B4E
0147
0148 struct kbd_repeat {
0149 int delay;
0150 int period;
0151
0152 };
0153
0154 #define KDKBDREP 0x4B52
0155
0156
0157 #define KDFONTOP 0x4B72
0158
0159 struct console_font_op {
0160 unsigned int op;
0161 unsigned int flags;
0162 unsigned int width, height;
0163 unsigned int charcount;
0164 unsigned char __user *data;
0165 };
0166
0167 struct console_font {
0168 unsigned int width, height;
0169 unsigned int charcount;
0170 unsigned char *data;
0171 };
0172
0173 #define KD_FONT_OP_SET 0
0174 #define KD_FONT_OP_GET 1
0175 #define KD_FONT_OP_SET_DEFAULT 2
0176 #define KD_FONT_OP_COPY 3
0177
0178 #define KD_FONT_FLAG_DONT_RECALC 1
0179
0180
0181
0182
0183
0184 #endif