You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

8 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /* QNX RtP keyboard handler routines header.
  2. Copyright (c) 2002 by Mike Gorchak
  3. Covered by the BSD license. */
  4. #if defined(TVOSf_QNXRtP) && !defined(QNXRTPKEY_HEADER_INCLUDED)
  5. #define QNXRTPKEY_HEADER_INCLUDED
  6. #define TVPH_KEY_SHIFT 0x00000001UL
  7. #define TVPH_KEY_CTRL 0x00000002UL
  8. #define TVPH_KEY_ALT 0x00000004UL
  9. struct _QNXRtPArtKeys
  10. {
  11. ushort rawkey;
  12. ushort transkey;
  13. };
  14. typedef struct _QNXRtPArtKeys QNXRtPArtKeys;
  15. class TGKeyQNXRtP: public TGKey
  16. {
  17. public:
  18. TGKeyQNXRtP() {};
  19. static void Suspend();
  20. static void Resume();
  21. static int KbHit();
  22. static void Clear();
  23. static ushort GKey();
  24. static unsigned GetShiftState();
  25. static void FillTEvent(TEvent &e);
  26. static void SetKbdMapping(int version);
  27. static void Init();
  28. protected:
  29. static ushort GetRaw();
  30. static ushort MakeArtKeys(QNXRtPArtKeys* array, ushort rawkey);
  31. protected:
  32. static struct termios saved_attributes;
  33. static ushort sFlags;
  34. static ushort undecoded;
  35. static ushort hightranstable[0x0100];
  36. static ushort lowtranstable[0x0100];
  37. static QNXRtPArtKeys shifttranstable[];
  38. static QNXRtPArtKeys alttranstable[];
  39. static QNXRtPArtKeys ctrltranstable[];
  40. static struct dlphoton phcon;
  41. static bool inpterm;
  42. };
  43. #endif // QNXRTPKEY_HEADER_INCLUDED