This source file includes following definitions.
- kbd_flag
- set_kbd_flag
- clr_kbd_flag
- chg_kbd_flag
- kbd_dead
- set_kbd_dead
- clr_kbd_dead
- chg_kbd_dead
- vc_kbd_flag
- set_vc_kbd_flag
- clr_vc_kbd_flag
- chg_vc_kbd_flag
1 #ifndef __LINUX_KEYBOARD_H
2 #define __LINUX_KEYBOARD_H
3
4 #include <linux/interrupt.h>
5 #define set_leds() mark_bh(KEYBOARD_BH)
6
7
8
9
10
11
12
13
14
15
16 extern unsigned long kbd_flags;
17
18
19
20
21
22 #define KG_LSHIFT 0
23 #define KG_RSHIFT 1
24 #define KG_LCTRL 2
25 #define KG_RCTRL 3
26 #define KG_ALT 4
27 #define KG_ALTGR 5
28 #define KG_CAPSLOCK 6
29
30
31
32
33
34 extern unsigned long kbd_dead_keys;
35 extern unsigned long kbd_prev_dead_keys;
36
37
38
39
40 #define KGD_E0 0
41 #define KGD_E1 1
42
43
44
45
46
47 struct kbd_struct {
48 unsigned long flags;
49 unsigned long default_flags;
50 unsigned char kbd_flags;
51 };
52
53 extern struct kbd_struct kbd_table[];
54
55
56
57
58
59 #define VC_SCROLLOCK 0
60 #define VC_NUMLOCK 1
61 #define VC_CAPSLOCK 2
62 #define VC_APPLIC 3
63 #define VC_CKMODE 5
64 #define VC_REPEAT 6
65 #define VC_RAW 7
66 #define VC_CRLF 8
67 #define VC_META 9
68
69 #define LED_MASK 7
70
71 extern unsigned long kbd_init(unsigned long);
72
73 extern inline int kbd_flag(int flag)
74 {
75 return kbd_flags & (1 << flag);
76 }
77
78 extern inline void set_kbd_flag(int flag)
79 {
80 kbd_flags |= 1 << flag;
81 }
82
83 extern inline void clr_kbd_flag(int flag)
84 {
85 kbd_flags &= ~(1 << flag);
86 }
87
88 extern inline void chg_kbd_flag(int flag)
89 {
90 kbd_flags ^= 1 << flag;
91 }
92
93 extern inline int kbd_dead(int flag)
94 {
95 return kbd_prev_dead_keys & (1 << flag);
96 }
97
98 extern inline void set_kbd_dead(int flag)
99 {
100 kbd_dead_keys |= 1 << flag;
101 }
102
103 extern inline void clr_kbd_dead(int flag)
104 {
105 kbd_dead_keys &= ~(1 << flag);
106 }
107
108 extern inline void chg_kbd_dead(int flag)
109 {
110 kbd_dead_keys ^= 1 << flag;
111 }
112
113 extern inline int vc_kbd_flag(struct kbd_struct * kbd, int flag)
114 {
115 return ((kbd->flags >> flag) & 1);
116 }
117
118 extern inline void set_vc_kbd_flag(struct kbd_struct * kbd, int flag)
119 {
120 kbd->flags |= 1 << flag;
121 }
122
123 extern inline void clr_vc_kbd_flag(struct kbd_struct * kbd, int flag)
124 {
125 kbd->flags &= ~(1 << flag);
126 }
127
128 extern inline void chg_vc_kbd_flag(struct kbd_struct * kbd, int flag)
129 {
130 kbd->flags ^= 1 << flag;
131 }
132
133 #endif