root/include/linux/kd.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_KD_H
   2 #define _LINUX_KD_H
   3 #include <linux/types.h>
   4 
   5 /* 0x4B is 'K', to avoid collision with termios and vt */
   6 
   7 #define GIO_FONT        0x4B60  /* gets font in expanded form */
   8 #define PIO_FONT        0x4B61  /* use font in expanded form */
   9 
  10 #define GIO_FONTX       0x4B6B  /* get font using struct consolefontdesc */
  11 #define PIO_FONTX       0x4B6C  /* set font using struct consolefontdesc */
  12 struct consolefontdesc {
  13         u_short charcount;      /* characters in font (256 or 512) */
  14         u_short charheight;     /* scan lines per character (1-32) */
  15         char *chardata;         /* font data in expanded form */
  16 };
  17 
  18 #define GIO_CMAP        0x4B70  /* gets colour palette on VGA+ */
  19 #define PIO_CMAP        0x4B71  /* sets colour palette on VGA+ */
  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 KDADDIO         0x4B34  /* add i/o port as valid */
  36 #define KDDELIO         0x4B35  /* del i/o port as valid */
  37 #define KDENABIO        0x4B36  /* enable i/o to video board */
  38 #define KDDISABIO       0x4B37  /* disable i/o to video board */
  39 
  40 #define KDSETMODE       0x4B3A  /* set text/graphics mode */
  41 #define         KD_TEXT         0x00
  42 #define         KD_GRAPHICS     0x01
  43 #define         KD_TEXT0        0x02    /* obsolete */
  44 #define         KD_TEXT1        0x03    /* obsolete */
  45 #define KDGETMODE       0x4B3B  /* get current mode */
  46 
  47 #define KDMAPDISP       0x4B3C  /* map display into address space */
  48 #define KDUNMAPDISP     0x4B3D  /* unmap display from address space */
  49 
  50 typedef char scrnmap_t;
  51 #define         E_TABSZ         256
  52 #define GIO_SCRNMAP     0x4B40  /* get screen mapping from kernel */
  53 #define PIO_SCRNMAP     0x4B41  /* put screen mapping table in kernel */
  54 #define GIO_UNISCRNMAP  0x4B69  /* get full Unicode screen mapping */
  55 #define PIO_UNISCRNMAP  0x4B6A  /* set full Unicode screen mapping */
  56 
  57 #define GIO_UNIMAP      0x4B66  /* get unicode-to-font mapping from kernel */
  58 struct unipair {
  59         u_short unicode;
  60         u_short fontpos;
  61 };
  62 struct unimapdesc {
  63         u_short entry_ct;
  64         struct unipair *entries;
  65 };
  66 #define PIO_UNIMAP      0x4B67  /* put unicode-to-font mapping in kernel */
  67 #define PIO_UNIMAPCLR   0x4B68  /* clear table, possibly advise hash algorithm */
  68 struct unimapinit {
  69         u_short advised_hashsize;  /* 0 if no opinion */
  70         u_short advised_hashstep;  /* 0 if no opinion */
  71         u_short advised_hashlevel; /* 0 if no opinion */
  72 };
  73 
  74 #define UNI_DIRECT_BASE 0xF000  /* start of Direct Font Region */
  75 #define UNI_DIRECT_MASK 0x01FF  /* Direct Font Region bitmask */
  76 
  77 #define         K_RAW           0x00
  78 #define         K_XLATE         0x01
  79 #define         K_MEDIUMRAW     0x02
  80 #define         K_UNICODE       0x03
  81 #define KDGKBMODE       0x4B44  /* gets current keyboard mode */
  82 #define KDSKBMODE       0x4B45  /* sets current keyboard mode */
  83 
  84 #define         K_METABIT       0x03
  85 #define         K_ESCPREFIX     0x04
  86 #define KDGKBMETA       0x4B62  /* gets meta key handling mode */
  87 #define KDSKBMETA       0x4B63  /* sets meta key handling mode */
  88 
  89 #define         K_SCROLLLOCK    0x01
  90 #define         K_CAPSLOCK      0x02
  91 #define         K_NUMLOCK       0x04
  92 #define KDGKBLED        0x4B64  /* get led flags (not lights) */
  93 #define KDSKBLED        0x4B65  /* set led flags (not lights) */
  94 
  95 struct kbentry {
  96         u_char kb_table;
  97         u_char kb_index;
  98         u_short kb_value;
  99 };
 100 #define         K_NORMTAB       0x00
 101 #define         K_SHIFTTAB      0x01
 102 #define         K_ALTTAB        0x02
 103 #define         K_ALTSHIFTTAB   0x03
 104 
 105 #define KDGKBENT        0x4B46  /* gets one entry in translation table */
 106 #define KDSKBENT        0x4B47  /* sets one entry in translation table */
 107 
 108 struct kbsentry {
 109         u_char kb_func;
 110         u_char kb_string[512];
 111 };
 112 #define KDGKBSENT       0x4B48  /* gets one function key string entry */
 113 #define KDSKBSENT       0x4B49  /* sets one function key string entry */
 114 
 115 struct kbdiacr {
 116         u_char diacr, base, result;
 117 };
 118 struct kbdiacrs {
 119         unsigned int kb_cnt;    /* number of entries in following array */
 120         struct kbdiacr kbdiacr[256];    /* MAX_DIACR from keyboard.h */
 121 };
 122 #define KDGKBDIACR      0x4B4A  /* read kernel accent table */
 123 #define KDSKBDIACR      0x4B4B  /* write kernel accent table */
 124 
 125 struct kbkeycode {
 126         unsigned int scancode, keycode;
 127 };
 128 #define KDGETKEYCODE    0x4B4C  /* read kernel keycode table entry */
 129 #define KDSETKEYCODE    0x4B4D  /* write kernel keycode table entry */
 130 
 131 #define KDSIGACCEPT     0x4B4E  /* accept kbd generated signals */
 132 
 133 /* note: 0x4B00-0x4B4E all have had a value at some time;
 134    don't reuse for the time being */
 135 /* note: 0x4B60-0x4B6C, 0x4B70, 0x4B71 used above */
 136 
 137 #endif /* _LINUX_KD_H */

/* [previous][next][first][last][top][bottom][index][help] */