• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  #ifndef KEYLAYOUTMAP_H
2  #define KEYLAYOUTMAP_H
3  
4  #include <utils/KeyedVector.h>
5  
6  namespace android {
7  
8  class KeyLayoutMap
9  {
10  public:
11      KeyLayoutMap();
12      ~KeyLayoutMap();
13  
14      status_t load(const char* filename);
15  
16      status_t map(int32_t scancode, int32_t *keycode, uint32_t *flags) const;
17      status_t findScancodes(int32_t keycode, Vector<int32_t>* outScancodes) const;
18  
19  private:
20      struct Key {
21          int32_t keycode;
22          uint32_t flags;
23      };
24  
25      status_t m_status;
26      KeyedVector<int32_t,Key> m_keys;
27  };
28  
29  };
30  
31  #endif // KEYLAYOUTMAP_H
32