1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 2 // 3 // Copyright (c) 2004, Haiku 4 // 5 // This software is part of the Haiku distribution and is covered 6 // by the Haiku license. 7 // 8 // 9 // File: Keymap.h 10 // Author: Jérôme Duval 11 // Description: Keyboard input server addon 12 // Created : September 7, 2004 13 // 14 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 15 16 #ifndef KEYMAP_H 17 #define KEYMAP_H 18 19 #include <InterfaceDefs.h> 20 #include <Entry.h> 21 22 class Keymap 23 { 24 public: 25 Keymap(); 26 ~Keymap(); 27 void DumpKeymap(); 28 bool IsModifierKey(uint32 keyCode); 29 uint32 Modifier(uint32 keyCode); 30 uint8 IsDeadKey(uint32 keyCode, uint32 modifiers); 31 bool IsDeadSecondKey(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey); 32 void GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey, char** chars, int32* numBytes); 33 uint32 Locks() { return fKeys.lock_settings; }; 34 status_t LoadCurrent(); 35 private: 36 char *fChars; 37 key_map fKeys; 38 }; 39 40 41 #endif //KEYMAP_H 42