Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 1 | // hardwarekeyboard.cpp - HardwareKeyboard object |
| 2 | // Shell file used for most devices. A custom hardwarekeyboard.cpp is needed for devices with a hardware keyboard. |
| 3 | |
| 4 | #include <stdarg.h> |
| 5 | #include <stdio.h> |
| 6 | #include <stdlib.h> |
| 7 | #include <string.h> |
| 8 | #include <fcntl.h> |
| 9 | #include <sys/reboot.h> |
| 10 | #include <sys/stat.h> |
| 11 | #include <sys/time.h> |
| 12 | #include <sys/mman.h> |
| 13 | #include <sys/types.h> |
| 14 | #include <sys/ioctl.h> |
| 15 | #include <time.h> |
| 16 | #include <unistd.h> |
| 17 | #include <stdlib.h> |
| 18 | |
| 19 | #include <string> |
| 20 | |
| 21 | extern "C" { |
| 22 | #include "../common.h" |
| 23 | #include "../minuitwrp/minui.h" |
| 24 | #include "../recovery_ui.h" |
| 25 | } |
| 26 | |
| 27 | #include "rapidxml.hpp" |
| 28 | #include "objects.hpp" |
| 29 | |
| 30 | HardwareKeyboard::HardwareKeyboard(void) { |
| 31 | // Do Nothing |
| 32 | } |
| 33 | |
| 34 | HardwareKeyboard::~HardwareKeyboard() { |
| 35 | // Do Nothing |
| 36 | } |
| 37 | |
| 38 | int HardwareKeyboard::KeyDown(int key_code) { |
| 39 | #ifdef _EVENT_LOGGING |
| 40 | LOGE("HardwareKeyboard::KeyDown %i\n", key_code); |
| 41 | #endif |
| 42 | PageManager::NotifyKey(key_code); |
| 43 | return 0; // 0 = no key repeat anything else turns on key repeat |
| 44 | } |
| 45 | |
| 46 | int HardwareKeyboard::KeyUp(int key_code) { |
| 47 | #ifdef _EVENT_LOGGING |
| 48 | LOGE("HardwareKeyboard::KeyUp %i\n", key_code); |
| 49 | #endif |
| 50 | return 0; |
| 51 | } |
| 52 | |
| 53 | int HardwareKeyboard::KeyRepeat(void) { |
| 54 | #ifdef _EVENT_LOGGING |
| 55 | LOGE("HardwareKeyboard::KeyRepeat\n"); |
| 56 | #endif |
| 57 | return 0; |
| 58 | } |