summaryrefslogtreecommitdiff
path: root/inputmethods/kjumpx/keyboard.cpp
Unidiff
Diffstat (limited to 'inputmethods/kjumpx/keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/kjumpx/keyboard.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/inputmethods/kjumpx/keyboard.cpp b/inputmethods/kjumpx/keyboard.cpp
index 3af6a78..dc44805 100644
--- a/inputmethods/kjumpx/keyboard.cpp
+++ b/inputmethods/kjumpx/keyboard.cpp
@@ -119,48 +119,49 @@ static const uchar *const specialMapParen[] = {
119 (const uchar *const)"[]", 119 (const uchar *const)"[]",
120 (const uchar *const)"{}", 120 (const uchar *const)"{}",
121 (const uchar *const)"<>", 121 (const uchar *const)"<>",
122 (const uchar *const)"@~", 122 (const uchar *const)"@~",
123}; 123};
124 124
125static const uchar *const num2Map = (const uchar *const)"67890"; 125static const uchar *const num2Map = (const uchar *const)"67890";
126 126
127static const mapElement mod2Map[] = { 127static const mapElement mod2Map[] = {
128 { Qt::Key_Backspace, 8 }, 128 { Qt::Key_Backspace, 8 },
129 { Qt::Key_Delete, 0 }, 129 { Qt::Key_Delete, 0 },
130 { Qt::Key_Return, 13 }, 130 { Qt::Key_Return, 13 },
131 { Qt::Key_Shift, 0 }, 131 { Qt::Key_Shift, 0 },
132 { myParenID, 0 }, 132 { myParenID, 0 },
133}; 133};
134 134
135static const int cursorMap[][2] = { 135static const int cursorMap[][2] = {
136 { Qt::Key_Home, Qt::Key_PageUp }, 136 { Qt::Key_Home, Qt::Key_PageUp },
137 { Qt::Key_End, Qt::Key_PageDown }, 137 { Qt::Key_End, Qt::Key_PageDown },
138 { Qt::Key_Up, Qt::Key_Up }, 138 { Qt::Key_Up, Qt::Key_Up },
139 { Qt::Key_Left, Qt::Key_Right }, 139 { Qt::Key_Left, Qt::Key_Right },
140 { Qt::Key_Down, Qt::Key_Down }, 140 { Qt::Key_Down, Qt::Key_Down },
141}; 141};
142 142
143using namespace KJumpX;
143 144
144Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) : 145Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) :
145 QFrame(parent, name, f), 146 QFrame(parent, name, f),
146 shift(0), paren(0), ctrl(0), alt(0), lang(1), lastKey(0), 147 shift(0), paren(0), ctrl(0), alt(0), lang(1), lastKey(0),
147 pressedKeyUnicode(0), pressedKeyQcode(0), pressedMod(0), 148 pressedKeyUnicode(0), pressedKeyQcode(0), pressedMod(0),
148 isnoncont(false), 149 isnoncont(false),
149 slideKeyUnicodeH(0), slideKeyQcodeH(0), slideKeyUnicodeV(0), slideKeyQcodeV(0), 150 slideKeyUnicodeH(0), slideKeyQcodeH(0), slideKeyUnicodeV(0), slideKeyQcodeV(0),
150 enableMouseTracking(false), slidePix(NULL), slidePixH(NULL), slidePixV(NULL), 151 enableMouseTracking(false), slidePix(NULL), slidePixH(NULL), slidePixV(NULL),
151 releasedPix(NULL), pressedPix(NULL) 152 releasedPix(NULL), pressedPix(NULL)
152{ 153{
153 //setPalette(QPalette(QColor(240,240,230))); // Beige! 154 //setPalette(QPalette(QColor(240,240,230))); // Beige!
154 155
155 releasedPlain = releasedShift = releasedParen = Resource::loadPixmap("kjumpx/released"); 156 releasedPlain = releasedShift = releasedParen = Resource::loadPixmap("kjumpx/released");
156 pressedPlain = pressedShift = pressedParen = Resource::loadPixmap("kjumpx/pressed"); 157 pressedPlain = pressedShift = pressedParen = Resource::loadPixmap("kjumpx/pressed");
157 pressedDigit = Resource::loadPixmap("kjumpx/pressed"); 158 pressedDigit = Resource::loadPixmap("kjumpx/pressed");
158 159
159 QPixmap tmp; 160 QPixmap tmp;
160 161
161 tmp = Resource::loadPixmap("kjumpx/releasedShift"); 162 tmp = Resource::loadPixmap("kjumpx/releasedShift");
162 bitBlt(&releasedShift, letterx1, 0, &tmp); 163 bitBlt(&releasedShift, letterx1, 0, &tmp);
163 164
164 tmp = Resource::loadPixmap("kjumpx/releasedParen"); 165 tmp = Resource::loadPixmap("kjumpx/releasedParen");
165 bitBlt(&releasedParen, specialx1, 0, &tmp); 166 bitBlt(&releasedParen, specialx1, 0, &tmp);
166 167