summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/frame.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/frame.cpp b/src/gui/frame.cpp
index b9899d8..12d49bc 100644
--- a/src/gui/frame.cpp
+++ b/src/gui/frame.cpp
@@ -538,8 +538,18 @@ void Frame::keyPressEvent(QKeyEvent* event)
QString text = event->text();
if(text.length() == 1 && text.at(0).row() == 0)
{
- // We found a Latin1 char and pray it is the correct case.
- key = text.at(0).cell();
+ QChar c = text.at(0);
+
+ // The next problem is that it may be a control character.
+ // This happens when Ctrl is pressed, so we only
+ // modify keys if they are lowercase or uppercase
+ // versions of the keycode.
+
+ if(c.toLower().toLatin1() == key || c.toUpper().toLatin1() == key)
+ {
+ // We found a Latin1 char and pray it is the correct case.
+ key = c.cell();
+ }
}
}
sendInputEvent(InputEvent::keyboardPress(key, event->modifiers()));