kbio.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __LINUX_KBIO_H
  2. #define __LINUX_KBIO_H
  3. /* Return keyboard type */
  4. #define KIOCTYPE _IOR('k', 9, int)
  5. /* Return Keyboard layout */
  6. #define KIOCLAYOUT _IOR('k', 20, int)
  7. enum {
  8. TR_NONE,
  9. TR_ASCII, /* keyboard is in regular state */
  10. TR_EVENT, /* keystrokes sent as firm events */
  11. TR_UNTRANS_EVENT /* EVENT+up and down+no translation */
  12. };
  13. /* Return the current keyboard translation */
  14. #define KIOCGTRANS _IOR('k', 5, int)
  15. /* Set the keyboard translation */
  16. #define KIOCTRANS _IOW('k', 0, int)
  17. /* Send a keyboard command */
  18. #define KIOCCMD _IOW('k', 8, int)
  19. /* Return if keystrokes are being sent to /dev/kbd */
  20. /* Set routing of keystrokes to /dev/kbd */
  21. #define KIOCSDIRECT _IOW('k', 10, int)
  22. /* Set keyboard leds */
  23. #define KIOCSLED _IOW('k', 14, unsigned char)
  24. /* Get keyboard leds */
  25. #define KIOCGLED _IOR('k', 15, unsigned char)
  26. /* Used by KIOC[GS]RATE */
  27. struct kbd_rate {
  28. unsigned char delay; /* Delay in Hz before first repeat. */
  29. unsigned char rate; /* In characters per second (0..50). */
  30. };
  31. /* Set keyboard rate */
  32. #define KIOCSRATE _IOW('k', 40, struct kbd_rate)
  33. /* Get keyboard rate */
  34. #define KIOCGRATE _IOW('k', 41, struct kbd_rate)
  35. /* Top bit records if the key is up or down */
  36. #define KBD_UP 0x80
  37. /* Usable information */
  38. #define KBD_KEYMASK 0x7f
  39. /* All keys up */
  40. #define KBD_IDLE 0x75
  41. #endif /* __LINUX_KBIO_H */