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 #define VC_PAUSE 10
69
70 #define LED_MASK 7
71
72 extern unsigned long kbd_init(unsigned long);
73
74 extern inline int kbd_flag(int flag)
75 {
76 return kbd_flags & (1 << flag);
77 }
78
79 extern inline void set_kbd_flag(int flag)
80 {
81 kbd_flags |= 1 << flag;
82 }
83
84 extern inline void clr_kbd_flag(int flag)
85 {
86 kbd_flags &= ~(1 << flag);
87 }
88
89 extern inline void chg_kbd_flag(int flag)
90 {
91 kbd_flags ^= 1 << flag;
92 }
93
94 extern inline int kbd_dead(int flag)
95 {
96 return kbd_prev_dead_keys & (1 << flag);
97 }
98
99 extern inline void set_kbd_dead(int flag)
100 {
101 kbd_dead_keys |= 1 << flag;
102 }
103
104 extern inline void clr_kbd_dead(int flag)
105 {
106 kbd_dead_keys &= ~(1 << flag);
107 }
108
109 extern inline void chg_kbd_dead(int flag)
110 {
111 kbd_dead_keys ^= 1 << flag;
112 }
113
114 extern inline int vc_kbd_flag(struct kbd_struct * kbd, int flag)
115 {
116 return ((kbd->flags >> flag) & 1);
117 }
118
119 extern inline void set_vc_kbd_flag(struct kbd_struct * kbd, int flag)
120 {
121 kbd->flags |= 1 << flag;
122 }
123
124 extern inline void clr_vc_kbd_flag(struct kbd_struct * kbd, int flag)
125 {
126 kbd->flags &= ~(1 << flag);
127 }
128
129 extern inline void chg_vc_kbd_flag(struct kbd_struct * kbd, int flag)
130 {
131 kbd->flags ^= 1 << flag;
132 }
133
134 #endif