1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-01-18 20:20:45 +00:00

Fixing keytabs (thank you yurivkhan)!

This commit is contained in:
Filippo Scognamiglio 2014-08-11 21:51:50 +02:00
parent d6288518c4
commit f7354e54dc
2 changed files with 8 additions and 2 deletions

View File

@ -79,7 +79,7 @@ Item{
session: KSession { session: KSession {
id: ksession id: ksession
kbScheme: "linux" kbScheme: "default"
onFinished: { onFinished: {
Qt.quit() Qt.quit()

View File

@ -439,7 +439,7 @@ bool KeyboardTranslatorReader::parseAsStateFlag(const QString& item , KeyboardTr
bool KeyboardTranslatorReader::parseAsKeyCode(const QString& item , int& keyCode) bool KeyboardTranslatorReader::parseAsKeyCode(const QString& item , int& keyCode)
{ {
QKeySequence sequence = QKeySequence::fromString(item); QKeySequence sequence = QKeySequence::fromString(item);
if ( !sequence.isEmpty() ) if ( !sequence.isEmpty() && sequence[0] != Qt::Key_unknown )
{ {
keyCode = sequence[0]; keyCode = sequence[0];
@ -453,6 +453,12 @@ bool KeyboardTranslatorReader::parseAsKeyCode(const QString& item , int& keyCode
keyCode = Qt::Key_PageUp; keyCode = Qt::Key_PageUp;
else if ( item == "next" ) else if ( item == "next" )
keyCode = Qt::Key_PageDown; keyCode = Qt::Key_PageDown;
else if ( item == "bracketleft" )
keyCode = Qt::Key_BracketLeft;
else if ( item == "backslash" )
keyCode = Qt::Key_Backslash;
else if ( item == "bracketright" )
keyCode = Qt::Key_BracketRight;
else else
return false; return false;