RTEMS  5.1
kd.h
Go to the documentation of this file.
1 
9 /*
10  * by: Rosimildo da Silva: rdasilva@connecttel.com
11  *
12  *
13  */
14 
15 #ifndef _LINUX_KD_H
16 #define _LINUX_KD_H
17 #include <sys/types.h>
18 
19 /* 0x4B is 'K', to avoid collision with termios and vt */
20 
21 #define KIOCSOUND 0x4B2F /* start sound generation (0 for off) */
22 #define KDMKTONE 0x4B30 /* generate tone */
23 
24 #define KDGETLED 0x4B31 /* return current led state */
25 #define KDSETLED 0x4B32 /* set led state [lights, not flags] */
26 #define LED_SCR 0x01 /* scroll lock led */
27 #define LED_CAP 0x04 /* caps lock led */
28 #define LED_NUM 0x02 /* num lock led */
29 
30 #define KDGKBTYPE 0x4B33 /* get keyboard type */
31 #define KB_84 0x01
32 #define KB_101 0x02 /* this is what we always answer */
33 #define KB_OTHER 0x03
34 
35 #define KDSETMODE 0x4B3A /* set text/graphics mode */
36 #define KD_TEXT 0x00
37 #define KD_GRAPHICS 0x01
38 #define KD_TEXT0 0x02 /* obsolete */
39 #define KD_TEXT1 0x03 /* obsolete */
40 #define KDGETMODE 0x4B3B /* get current mode */
41 
42 #define K_RAW 0x00
43 #define K_XLATE 0x01
44 #define K_MEDIUMRAW 0x02
45 #define K_UNICODE 0x03
46 #define KDGKBMODE 0x4B44 /* gets current keyboard mode */
47 #define KDSKBMODE 0x4B45 /* sets current keyboard mode */
48 
49 #define K_METABIT 0x03
50 #define K_ESCPREFIX 0x04
51 #define KDGKBMETA 0x4B62 /* gets meta key handling mode */
52 #define KDSKBMETA 0x4B63 /* sets meta key handling mode */
53 
54 #define K_SCROLLLOCK 0x01
55 #define K_CAPSLOCK 0x02
56 #define K_NUMLOCK 0x04
57 #define KDGKBLED 0x4B64 /* get led flags (not lights) */
58 #define KDSKBLED 0x4B65 /* set led flags (not lights) */
59 
60 struct kbentry {
61  unsigned char kb_table;
62  unsigned char kb_index;
63  unsigned short kb_value;
64 };
65 #define K_NORMTAB 0x00
66 #define K_SHIFTTAB 0x01
67 #define K_ALTTAB 0x02
68 #define K_ALTSHIFTTAB 0x03
69 
70 #define KDGKBENT 0x4B46 /* gets one entry in translation table */
71 #define KDSKBENT 0x4B47 /* sets one entry in translation table */
72 
73 struct kbsentry {
74  unsigned char kb_func;
75  unsigned char kb_string[512];
76 };
77 
78 struct kbdiacr {
79  unsigned char diacr, base, result;
80 };
81 struct kbdiacrs {
82  unsigned int kb_cnt; /* number of entries in following array */
83  struct kbdiacr kbdiacr[256]; /* MAX_DIACR from keyboard.h */
84 };
85 #define KDGKBDIACR 0x4B4A /* read kernel accent table */
86 #define KDSKBDIACR 0x4B4B /* write kernel accent table */
87 
88 struct kbkeycode {
89  unsigned int scancode, keycode;
90 };
91 #define KDGETKEYCODE 0x4B4C /* read kernel keycode table entry */
92 #define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */
93 
94 #define KDSIGACCEPT 0x4B4E /* accept kbd generated signals */
95 
96 #define KDGHWCLK 0x4B50 /* get hardware clock */
97 #define KDSHWCLK 0x4B51 /* set hardware clock */
98 
99 struct kbd_repeat {
100  int delay; /* in msec; <= 0: don't change */
101  int rate; /* in msec; <= 0: don't change */
102 };
103 
104 #define KDKBDREP 0x4B52 /* set keyboard delay/repeat rate;
105  * actually used values are returned */
106 
107 /* note: 0x4B00-0x4B4E all have had a value at some time;
108  don't reuse for the time being */
109 /* note: 0x4B60-0x4B6D, 0x4B70-0x4B72 used above */
110 
111 #endif /* _LINUX_KD_H */
Definition: kd.h:78
Definition: kd.h:88
Definition: kd.h:99
Definition: kd.h:81
Definition: kd.h:60
Definition: kd.h:73