diff options
Diffstat (limited to 'src/VButton.cpp')
-rw-r--r-- | src/VButton.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/VButton.cpp b/src/VButton.cpp index 41871cd..1959990 100644 --- a/src/VButton.cpp +++ b/src/VButton.cpp @@ -3,6 +3,9 @@ #include <tqfont.h> #include <tdeconfig.h> #include <tdeapplication.h> +#include "Xutils.h" +#include <X11/XKBlib.h> + double VButton::pw=552.0; double VButton::ph=235.0; @@ -21,6 +24,33 @@ VButton::~VButton() { } +void VButton::setupTexts(Display *display) +{ + // normal text + KeySym keysym_c = XkbKeycodeToKeysym(display, keycode, 0, 0); + TQChar c((uint)keysym2ucs(keysym_c)); + if (c == '&') + { + setText("&&"); + } + else + { + setText(c); + } + + // shift text + keysym_c = XkbKeycodeToKeysym(display, keycode, 0, 1); + c = (uint)keysym2ucs(keysym_c); + if (c == '&') + { + setShiftText("&&"); + } + else + { + setShiftText(c); + } +} + void VButton::shiftCapsPressed(bool shift, bool caps) { if (isAlpha) |