kd.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. #ifndef _LINUX_KD_H
  2. #define _LINUX_KD_H
  3. #define GIO_FONT 0x4B60
  4. #define PIO_FONT 0x4B61
  5. #define GIO_FONTX 0x4B6B
  6. #define PIO_FONTX 0x4B6C
  7. struct consolefontdesc {
  8. unsigned short charcount;
  9. unsigned short charheight;
  10. char *chardata;
  11. };
  12. #define PIO_FONTRESET 0x4B6D
  13. #define GIO_CMAP 0x4B70
  14. #define PIO_CMAP 0x4B71
  15. #define KIOCSOUND 0x4B2F
  16. #define KDMKTONE 0x4B30
  17. #define KDGETLED 0x4B31
  18. #define KDSETLED 0x4B32
  19. #define LED_SCR 0x01
  20. #define LED_NUM 0x02
  21. #define LED_CAP 0x04
  22. #define KDGKBTYPE 0x4B33
  23. #define KB_84 0x01
  24. #define KB_101 0x02
  25. #define KB_OTHER 0x03
  26. #define KDADDIO 0x4B34
  27. #define KDDELIO 0x4B35
  28. #define KDENABIO 0x4B36
  29. #define KDDISABIO 0x4B37
  30. #define KDSETMODE 0x4B3A
  31. #define KD_TEXT 0x00
  32. #define KD_GRAPHICS 0x01
  33. #define KD_TEXT0 0x02
  34. #define KD_TEXT1 0x03
  35. #define KDGETMODE 0x4B3B
  36. #define KDMAPDISP 0x4B3C
  37. #define KDUNMAPDISP 0x4B3D
  38. typedef char scrnmap_t;
  39. #define E_TABSZ 256
  40. #define GIO_SCRNMAP 0x4B40
  41. #define PIO_SCRNMAP 0x4B41
  42. #define GIO_UNISCRNMAP 0x4B69
  43. #define PIO_UNISCRNMAP 0x4B6A
  44. #define GIO_UNIMAP 0x4B66
  45. struct unipair {
  46. unsigned short unicode;
  47. unsigned short fontpos;
  48. };
  49. struct unimapdesc {
  50. unsigned short entry_ct;
  51. struct unipair *entries;
  52. };
  53. #define PIO_UNIMAP 0x4B67
  54. #define PIO_UNIMAPCLR 0x4B68
  55. struct unimapinit {
  56. unsigned short advised_hashsize;
  57. unsigned short advised_hashstep;
  58. unsigned short advised_hashlevel;
  59. };
  60. #define UNI_DIRECT_BASE 0xF000
  61. #define UNI_DIRECT_MASK 0x01FF
  62. #define K_RAW 0x00
  63. #define K_XLATE 0x01
  64. #define K_MEDIUMRAW 0x02
  65. #define K_UNICODE 0x03
  66. #define KDGKBMODE 0x4B44
  67. #define KDSKBMODE 0x4B45
  68. #define K_METABIT 0x03
  69. #define K_ESCPREFIX 0x04
  70. #define KDGKBMETA 0x4B62
  71. #define KDSKBMETA 0x4B63
  72. #define K_SCROLLLOCK 0x01
  73. #define K_NUMLOCK 0x02
  74. #define K_CAPSLOCK 0x04
  75. #define KDGKBLED 0x4B64
  76. #define KDSKBLED 0x4B65
  77. struct kbentry {
  78. unsigned char kb_table;
  79. unsigned char kb_index;
  80. unsigned short kb_value;
  81. };
  82. #define K_NORMTAB 0x00
  83. #define K_SHIFTTAB 0x01
  84. #define K_ALTTAB 0x02
  85. #define K_ALTSHIFTTAB 0x03
  86. #define KDGKBENT 0x4B46
  87. #define KDSKBENT 0x4B47
  88. struct kbsentry {
  89. unsigned char kb_func;
  90. unsigned char kb_string[512];
  91. };
  92. #define KDGKBSENT 0x4B48
  93. #define KDSKBSENT 0x4B49
  94. struct kbdiacr {
  95. unsigned char diacr, base, result;
  96. };
  97. struct kbdiacrs {
  98. unsigned int kb_cnt;
  99. struct kbdiacr kbdiacr[256];
  100. };
  101. #define KDGKBDIACR 0x4B4A
  102. #define KDSKBDIACR 0x4B4B
  103. struct kbkeycode {
  104. unsigned int scancode, keycode;
  105. };
  106. #define KDGETKEYCODE 0x4B4C
  107. #define KDSETKEYCODE 0x4B4D
  108. #define KDSIGACCEPT 0x4B4E
  109. struct kbd_repeat {
  110. int delay;
  111. int rate;
  112. };
  113. #define KDKBDREP 0x4B52
  114. #define KDFONTOP 0x4B72
  115. struct console_font_op {
  116. unsigned int op;
  117. unsigned int flags;
  118. unsigned int width, height;
  119. unsigned int charcount;
  120. unsigned char *data;
  121. };
  122. #define KD_FONT_OP_SET 0
  123. #define KD_FONT_OP_GET 1
  124. #define KD_FONT_OP_SET_DEFAULT 2
  125. #define KD_FONT_OP_COPY 3
  126. #define KD_FONT_FLAG_DONT_RECALC 1
  127. #endif