Support Ctrl characters.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2020-06-15 10:13:16 +01:00
parent 12a4180fc7
commit 059820847a

View file

@ -113,7 +113,11 @@ void Video::keyPressEvent(QKeyEvent *event)
if (ch >= 'A' && ch <= 'Z')
{
const Qt::KeyboardModifiers modifiers = event->modifiers();
if (modifiers & Qt::ShiftModifier)
if (modifiers & Qt::ControlModifier)
{
ch = (ch - 'A') + 1;
}
else if (modifiers & Qt::ShiftModifier)
{
ch += 'a' - 'A';
}