From 6a88cbc2bfa43b2a18eb896b3d635622da7e9d0a Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Fri, 20 May 2005 19:34:23 +0000 Subject: - add keyboard mode support (like in enigma1) --- lib/driver/rc.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib/driver/rc.h') diff --git a/lib/driver/rc.h b/lib/driver/rc.h index 7b735962..1ce13c72 100644 --- a/lib/driver/rc.h +++ b/lib/driver/rc.h @@ -166,6 +166,7 @@ class eRCInput: public Object int locked; int handle; static eRCInput *instance; + int keyboardMode; public: struct lstr @@ -190,6 +191,30 @@ public: void setFile(int handle); + /* This is only relevant for "keyboard"-styled input devices, + i.e. not plain remote controls. It's up to the input device + driver to decide wheter an input device is a keyboard or + not. + + kmNone will ignore all Ascii Characters sent from the + keyboard/console driver, only give normal keycodes to the + application. + + kmAscii will filter out all keys which produce ascii characters, + and send them instead. Note that Modifiers like shift will still + be send. Control keys which produce escape codes are send using + normal keycodes. + + kmAll will ignore all keycodes, and send everything as ascii, + including escape codes. Pretty much useless, since you should + lock the console and pass this as the console fd for making the + tc* stuff working. + */ + + enum { kmNone, kmAscii, kmAll }; + void setKeyboardMode(int mode) { keyboardMode = mode; } + int getKeyboardMode() { return keyboardMode; } + void keyPressed(const eRCKey &key) { /*emit*/ keyEvent(key); -- cgit v1.2.3