summaryrefslogtreecommitdiff
path: root/softhddevice.cpp
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2014-01-08 16:57:08 +0100
committerJohns <johns98@gmx.net>2014-01-08 16:57:08 +0100
commit978fc59abadba1b9d305572554e6638198753a00 (patch)
treea1bca1972c016f3c819802819a86a44c6954287c /softhddevice.cpp
parentaee9bbed90940159ed9931e56ada67943f9ee21c (diff)
downloadvdr-plugin-softhddevice-978fc59abadba1b9d305572554e6638198753a00.tar.gz
vdr-plugin-softhddevice-978fc59abadba1b9d305572554e6638198753a00.tar.bz2
Add support for umlauts in input fields.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r--softhddevice.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 0d75cc9..d5b8f0d 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -212,9 +212,10 @@ class cSoftRemote:public cRemote
** @param key pressed/released key name
** @param repeat repeated key flag
** @param release released key flag
+** @param letter x11 character string (system setting locale)
*/
extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat,
- int release)
+ int release, const char *letter)
{
cRemote *remote;
cSoftRemote *csoft;
@@ -237,9 +238,17 @@ extern "C" void FeedKeyPress(const char *keymap, const char *key, int repeat,
csoft = new cSoftRemote(keymap);
}
- //dsyslog("[softhddev]%s %s, %s\n", __FUNCTION__, keymap, key);
+ //dsyslog("[softhddev]%s %s, %s, %s\n", __FUNCTION__, keymap, key, letter);
if (key[1]) { // no single character
- csoft->Put(key, repeat, release);
+ if (!csoft->Put(key, repeat, release) && letter) {
+ cCharSetConv conv;
+ unsigned code;
+
+ code = Utf8CharGet(conv.Convert(letter));
+ if (code <= 0xFF) {
+ cRemote::Put(KBDKEY(code)); // feed it for edit mode
+ }
+ }
} else if (!csoft->Put(key, repeat, release)) {
cRemote::Put(KBDKEY(key[0])); // feed it for edit mode
}