From 54b6cfa9a9e5b861a9930af873580d6dc20f773c Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 21 Oct 2008 07:00:00 -0700 Subject: Initial Contribution --- libs/ui/KeyLayoutMap.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 libs/ui/KeyLayoutMap.h (limited to 'libs/ui/KeyLayoutMap.h') diff --git a/libs/ui/KeyLayoutMap.h b/libs/ui/KeyLayoutMap.h new file mode 100644 index 000000000000..43f84ce4964d --- /dev/null +++ b/libs/ui/KeyLayoutMap.h @@ -0,0 +1,31 @@ +#ifndef KEYLAYOUTMAP_H +#define KEYLAYOUTMAP_H + +#include + +namespace android { + +class KeyLayoutMap +{ +public: + KeyLayoutMap(); + ~KeyLayoutMap(); + + status_t load(const char* filename); + + status_t map(int32_t scancode, int32_t *keycode, uint32_t *flags) const; + status_t findScancodes(int32_t keycode, Vector* outScancodes) const; + +private: + struct Key { + int32_t keycode; + uint32_t flags; + }; + + status_t m_status; + KeyedVector m_keys; +}; + +}; + +#endif // KEYLAYOUTMAP_H -- cgit v1.2.3-59-g8ed1b