From 51a0e82eb29a6dfc79f93479883383fbdbf8bcc2 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 5 Sep 2012 15:24:24 -0400 Subject: TWRP-ify AOSP code Pull in most TWRP sources Stub out partition management code Make it compile -- probably will not boot Kind of a mess but have to start somewhere --- gui/hardwarekeyboard.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 gui/hardwarekeyboard.cpp (limited to 'gui/hardwarekeyboard.cpp') diff --git a/gui/hardwarekeyboard.cpp b/gui/hardwarekeyboard.cpp new file mode 100644 index 000000000..39b02cc17 --- /dev/null +++ b/gui/hardwarekeyboard.cpp @@ -0,0 +1,58 @@ +// hardwarekeyboard.cpp - HardwareKeyboard object +// Shell file used for most devices. A custom hardwarekeyboard.cpp is needed for devices with a hardware keyboard. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +extern "C" { +#include "../common.h" +#include "../minuitwrp/minui.h" +#include "../recovery_ui.h" +} + +#include "rapidxml.hpp" +#include "objects.hpp" + +HardwareKeyboard::HardwareKeyboard(void) { + // Do Nothing +} + +HardwareKeyboard::~HardwareKeyboard() { + // Do Nothing +} + +int HardwareKeyboard::KeyDown(int key_code) { +#ifdef _EVENT_LOGGING + LOGE("HardwareKeyboard::KeyDown %i\n", key_code); +#endif + PageManager::NotifyKey(key_code); + return 0; // 0 = no key repeat anything else turns on key repeat +} + +int HardwareKeyboard::KeyUp(int key_code) { +#ifdef _EVENT_LOGGING + LOGE("HardwareKeyboard::KeyUp %i\n", key_code); +#endif + return 0; +} + +int HardwareKeyboard::KeyRepeat(void) { +#ifdef _EVENT_LOGGING + LOGE("HardwareKeyboard::KeyRepeat\n"); +#endif + return 0; +} -- cgit v1.2.3