1 /*        $NetBSD: pccons.h,v 1.7 2019/02/26 10:30:28 msaitoh Exp $   */
2 /*        $OpenBSD: pccons.h,v 1.2 1996/09/01 16:50:12 deraadt Exp $  */
3 /*        NetBSD: pccons.h,v 1.4 1996/02/02 18:06:06 mycroft Exp      */
4 
5 /*
6  * pccons.h -- pccons ioctl definitions
7  */
8 
9 #ifndef _PCCONS_H_
10 #define _PCCONS_H_
11 
12 #include <sys/ioctl.h>
13 
14 /* key types -- warning: pccons.c depends on most values */
15 
16 #define   KB_SCROLL 0x0001    /* stop output */
17 #define   KB_NUM              0x0002    /* numeric shift  cursors vs. numeric */
18 #define   KB_CAPS             0x0004    /* caps shift -- swaps case of letter */
19 #define   KB_SHIFT  0x0008    /* keyboard shift */
20 #define   KB_CTL              0x0010    /* control shift  -- allows ctl function */
21 #define   KB_ASCII  0x0020    /* ascii code for this key */
22 #define   KB_ALTGR  0x0040    /* alternate graphics shift */
23 #define   KB_ALT              0x0080    /* alternate shift -- alternate chars */
24 #define   KB_FUNC             0x0100    /* function key */
25 #define   KB_KP               0x0200    /* Keypad keys */
26 #define   KB_NONE             0x0400    /* no function */
27 
28 #define   KB_CODE_SIZE        4         /* Use a max of 4 for now... */
29 #define KB_NUM_KEYS 128       /* Number of scan codes */
30 typedef struct {
31           u_short   type;
32           char unshift[KB_CODE_SIZE];
33           char shift[KB_CODE_SIZE];
34           char ctl[KB_CODE_SIZE];
35           char altgr[KB_CODE_SIZE];
36           char shift_altgr[KB_CODE_SIZE];
37 } pccons_keymap_t;
38 
39 #define CONSOLE_X_MODE_ON         _IO('t', 121)
40 #define CONSOLE_X_MODE_OFF        _IO('t', 122)
41 #define CONSOLE_X_BELL                     _IOW('t', 123, int[2])
42 #define CONSOLE_SET_TYPEMATIC_RATE _IOW('t', 124, u_char)
43 #define CONSOLE_GET_KEYMAP       _IOR('t', 128, pccons_keymap_t[KB_NUM_KEYS])
44 #define CONSOLE_SET_KEYMAP       _IOW('t', 129, pccons_keymap_t[KB_NUM_KEYS])
45 
46 #endif /* _PCCONS_H_ */
47