summaryrefslogtreecommitdiffstats
path: root/src/MainWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MainWidget.cpp')
-rw-r--r--src/MainWidget.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/MainWidget.cpp b/src/MainWidget.cpp
index ff10c27..ea6fc9b 100644
--- a/src/MainWidget.cpp
+++ b/src/MainWidget.cpp
@@ -953,12 +953,19 @@ void MainWidget::setupText(VButton& v)
// lowercase text
KeySym keysym_l = XkbKeycodeToKeysym(display, keycode, 0, 0);
- TQString btn_text(TQChar((uint)keysym2ucs(keysym_l)));
- v.setText(btn_text);
+ TQChar c((uint)keysym2ucs(keysym_l));
+ if (c == '&')
+ {
+ v.setText("&&");
+ }
+ else
+ {
+ v.setText(c);
+ }
// uppercase text
KeySym keysym_u = XkbKeycodeToKeysym(display, keycode, 0, 1);
- TQChar c((uint)keysym2ucs(keysym_u));
+ c = (uint)keysym2ucs(keysym_u);
if (c == '&')
{
v.setShiftText("&&");
@@ -976,6 +983,8 @@ void MainWidget::mappingNotify(XMappingEvent *)
VButton *v = btns[a];
setupText(*v);
}
+ updateNumlock();
+ updateShiftCaps();
}
KbdDock::KbdDock ( MainWidget *m )