File: kbio.h

package info (click to toggle)
kernel-source-2.2.25 2.2.25-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 92,756 kB
  • ctags: 280,018
  • sloc: ansic: 1,711,350; asm: 60,340; makefile: 10,295; sh: 2,396; perl: 907; tcl: 570; lisp: 218; cpp: 186; awk: 133; sed: 72
file content (56 lines) | stat: -rw-r--r-- 1,403 bytes parent folder | download | duplicates (42)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef __LINUX_KBIO_H
#define __LINUX_KBIO_H

/* Return keyboard type */
#define KIOCTYPE    _IOR('k', 9, int)
/* Return Keyboard layout */
#define KIOCLAYOUT  _IOR('k', 20, int)

enum {
    TR_NONE,
    TR_ASCII,			/* keyboard is in regular state */
    TR_EVENT,			/* keystrokes sent as firm events */
    TR_UNTRANS_EVENT		/* EVENT+up and down+no translation */
};

/* Return the current keyboard translation */
#define KIOCGTRANS  _IOR('k', 5, int)
/* Set the keyboard translation */
#define KIOCTRANS   _IOW('k', 0, int)

/* Send a keyboard command */
#define KIOCCMD     _IOW('k', 8, int)

/* Return if keystrokes are being sent to /dev/kbd */

/* Set routing of keystrokes to /dev/kbd */
#define KIOCSDIRECT _IOW('k', 10, int)

/* Set keyboard leds */
#define KIOCSLED    _IOW('k', 14, unsigned char)

/* Get keyboard leds */
#define KIOCGLED    _IOR('k', 15, unsigned char)

/* Used by KIOC[GS]RATE */
struct kbd_rate {
	unsigned char delay;	/* Delay in Hz before first repeat.	*/
	unsigned char rate;	/* In characters per second (0..50).	*/
};

/* Set keyboard rate */
#define KIOCSRATE   _IOW('k', 40, struct kbd_rate)

/* Get keyboard rate */
#define KIOCGRATE   _IOW('k', 41, struct kbd_rate)

/* Top bit records if the key is up or down */
#define KBD_UP      0x80

/* Usable information */
#define KBD_KEYMASK 0x7f

/* All keys up */
#define KBD_IDLE    0x75

#endif /* __LINUX_KBIO_H */