|
|
@ -132,7 +132,6 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
btns.append ( v );
|
|
|
|
btns.append ( v );
|
|
|
|
v->res();
|
|
|
|
v->res();
|
|
|
|
//caps_btns.append ( v );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
VButton *bksp = new VButton ( this,"" );
|
|
|
|
VButton *bksp = new VButton ( this,"" );
|
|
|
@ -201,10 +200,9 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
caps->resize ( 63,30 );
|
|
|
|
caps->resize ( 63,30 );
|
|
|
|
caps->setText ( "Caps" );
|
|
|
|
caps->setText ( "Caps" );
|
|
|
|
caps->setToggleButton ( true );
|
|
|
|
caps->setToggleButton ( true );
|
|
|
|
caps->res();
|
|
|
|
connect ( caps,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleShift ( unsigned int ) ) );
|
|
|
|
other_keys.append(caps);
|
|
|
|
other_keys.append(caps);
|
|
|
|
connect ( caps,TQT_SIGNAL ( clicked() ),this,TQT_SLOT ( toggleCaps() ) );
|
|
|
|
caps->res();
|
|
|
|
connect ( caps,TQT_SIGNAL ( keyClick ( unsigned int ) ),this,TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for ( int a=0;a<R3LEN;a++ )
|
|
|
|
for ( int a=0;a<R3LEN;a++ )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -245,15 +243,15 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
enter->res();
|
|
|
|
enter->res();
|
|
|
|
|
|
|
|
|
|
|
|
//ROW 4
|
|
|
|
//ROW 4
|
|
|
|
lshft = new VButton ( this,"" );
|
|
|
|
lshift = new VButton ( this,"" );
|
|
|
|
lshft->setKeyCode ( 50 );
|
|
|
|
lshift->setKeyCode ( 50 );
|
|
|
|
lshft->move ( stx,sty+ ( 4*35 ) );
|
|
|
|
lshift->move ( stx,sty+ ( 4*35 ) );
|
|
|
|
lshft->resize ( 45,30 );
|
|
|
|
lshift->resize ( 45,30 );
|
|
|
|
lshft->setText ( "Shift" );
|
|
|
|
lshift->setText ( "Shift" );
|
|
|
|
lshft->setToggleButton ( true );
|
|
|
|
lshift->setToggleButton ( true );
|
|
|
|
connect ( lshft,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleShift() ) );
|
|
|
|
connect ( lshift,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleShift( unsigned int ) ) );
|
|
|
|
mod_keys.append ( lshft );
|
|
|
|
mod_keys.append ( lshift );
|
|
|
|
lshft->res();
|
|
|
|
lshift->res();
|
|
|
|
|
|
|
|
|
|
|
|
for ( int a=0;a<R4LEN;a++ )
|
|
|
|
for ( int a=0;a<R4LEN;a++ )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -261,7 +259,7 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
v->setKeyCode ( kc4[a] );
|
|
|
|
v->setKeyCode ( kc4[a] );
|
|
|
|
//v->setText ( k4.mid ( a,1 ) );
|
|
|
|
//v->setText ( k4.mid ( a,1 ) );
|
|
|
|
//v->setShiftText ( k4s.mid ( a,1 ) );
|
|
|
|
//v->setShiftText ( k4s.mid ( a,1 ) );
|
|
|
|
v->move ( stx+lshft->width() +5+ ( 35*a ),sty+ ( 4*35 ) );
|
|
|
|
v->move ( stx+lshift->width() +5+ ( 35*a ),sty+ ( 4*35 ) );
|
|
|
|
btns.append ( v );
|
|
|
|
btns.append ( v );
|
|
|
|
v->res();
|
|
|
|
v->res();
|
|
|
|
connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
connect ( v,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
@ -269,7 +267,7 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
|
|
|
|
|
|
|
|
VButton *sm = new VButton ( this,"" );
|
|
|
|
VButton *sm = new VButton ( this,"" );
|
|
|
|
sm->setKeyCode ( 59 );
|
|
|
|
sm->setKeyCode ( 59 );
|
|
|
|
sm->move ( stx+ ( R4LEN *35 ) +lshft->width() +5,sty+ ( 4*35 ) );
|
|
|
|
sm->move ( stx+ ( R4LEN *35 ) +lshift->width() +5,sty+ ( 4*35 ) );
|
|
|
|
//sm->setText ( "," );
|
|
|
|
//sm->setText ( "," );
|
|
|
|
//sm->setShiftText ( "<" );
|
|
|
|
//sm->setShiftText ( "<" );
|
|
|
|
connect ( sm,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
connect ( sm,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
@ -278,7 +276,7 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
|
|
|
|
|
|
|
|
VButton *gr = new VButton ( this,"" );
|
|
|
|
VButton *gr = new VButton ( this,"" );
|
|
|
|
gr->setKeyCode ( 60 );
|
|
|
|
gr->setKeyCode ( 60 );
|
|
|
|
gr->move ( stx+ ( ( R4LEN +1 ) *35 ) +lshft->width() +5,sty+ ( 4*35 ) );
|
|
|
|
gr->move ( stx+ ( ( R4LEN +1 ) *35 ) +lshift->width() +5,sty+ ( 4*35 ) );
|
|
|
|
//gr->setText ( "." );
|
|
|
|
//gr->setText ( "." );
|
|
|
|
//gr->setShiftText ( ">" );
|
|
|
|
//gr->setShiftText ( ">" );
|
|
|
|
connect ( gr,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
connect ( gr,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
@ -287,22 +285,22 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
|
|
|
|
|
|
|
|
VButton *sl = new VButton ( this,"" );
|
|
|
|
VButton *sl = new VButton ( this,"" );
|
|
|
|
sl->setKeyCode ( 61 );
|
|
|
|
sl->setKeyCode ( 61 );
|
|
|
|
sl->move ( stx+ ( ( R4LEN +2 ) *35 ) +lshft->width() +5,sty+ ( 4*35 ) );
|
|
|
|
sl->move ( stx+ ( ( R4LEN +2 ) *35 ) +lshift->width() +5,sty+ ( 4*35 ) );
|
|
|
|
//sl->setText ( "/" );
|
|
|
|
//sl->setText ( "/" );
|
|
|
|
//sl->setShiftText ( "?" );
|
|
|
|
//sl->setShiftText ( "?" );
|
|
|
|
connect ( sl,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
connect ( sl,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
btns.append ( sl );
|
|
|
|
btns.append ( sl );
|
|
|
|
sl->res();
|
|
|
|
sl->res();
|
|
|
|
|
|
|
|
|
|
|
|
rshft = new VButton ( this,"" );
|
|
|
|
rshift = new VButton ( this,"" );
|
|
|
|
rshft->setKeyCode ( 62 );
|
|
|
|
rshift->setKeyCode ( 62 );
|
|
|
|
rshft->move ( stx+ ( ( R4LEN +3 ) *35 ) +lshft->width() +5,sty+ ( 4*35 ) );
|
|
|
|
rshift->move ( stx+ ( ( R4LEN +3 ) *35 ) +lshift->width() +5,sty+ ( 4*35 ) );
|
|
|
|
rshft->resize ( 68,30 );
|
|
|
|
rshift->resize ( 68,30 );
|
|
|
|
rshft->setText ( "Shift" );
|
|
|
|
rshift->setText ( "Shift" );
|
|
|
|
rshft->setToggleButton ( true );
|
|
|
|
rshift->setToggleButton ( true );
|
|
|
|
connect ( rshft,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleShift() ) );
|
|
|
|
connect ( rshift,TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleShift( unsigned int ) ) );
|
|
|
|
mod_keys.append ( rshft );
|
|
|
|
mod_keys.append ( rshift );
|
|
|
|
rshft->res();
|
|
|
|
rshift->res();
|
|
|
|
|
|
|
|
|
|
|
|
//ROW 5
|
|
|
|
//ROW 5
|
|
|
|
lctrl = new VButton ( this,"" );
|
|
|
|
lctrl = new VButton ( this,"" );
|
|
|
@ -378,8 +376,6 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
mod_keys.append ( rctrl );
|
|
|
|
mod_keys.append ( rctrl );
|
|
|
|
rctrl->res();
|
|
|
|
rctrl->res();
|
|
|
|
|
|
|
|
|
|
|
|
mappingNotify(NULL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
quit = new VButton ( this,"quit" );
|
|
|
|
quit = new VButton ( this,"quit" );
|
|
|
|
quit->resize ( 20,30 );
|
|
|
|
quit->resize ( 20,30 );
|
|
|
|
quit->move ( 524,15 );
|
|
|
|
quit->move ( 524,15 );
|
|
|
@ -461,8 +457,7 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
numl->setText("Num\nLock");
|
|
|
|
numl->setText("Num\nLock");
|
|
|
|
numl->setToggleButton ( true );
|
|
|
|
numl->setToggleButton ( true );
|
|
|
|
other_keys.append(numl);
|
|
|
|
other_keys.append(numl);
|
|
|
|
connect ( numl, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
connect ( numl, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( toggleNumlock() ) );
|
|
|
|
connect ( numl, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( toggleNumlock() ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
div = new VButton(this,"div");
|
|
|
|
div = new VButton(this,"div");
|
|
|
@ -508,6 +503,8 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
|
|
|
|
min->res();
|
|
|
|
min->res();
|
|
|
|
connect ( min, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
connect ( min, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mappingNotify(NULL);
|
|
|
|
|
|
|
|
|
|
|
|
if (!stand_alone)
|
|
|
|
if (!stand_alone)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tray = new KbdTray ( this );
|
|
|
|
tray = new KbdTray ( this );
|
|
|
@ -656,6 +653,7 @@ void MainWidget::restorePosition()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setGeometry(dflt_geom);
|
|
|
|
setGeometry(dflt_geom);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::saveState()
|
|
|
|
void MainWidget::saveState()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDEConfig *cfg = 0;
|
|
|
|
TDEConfig *cfg = 0;
|
|
|
@ -831,6 +829,7 @@ void MainWidget::showDock()
|
|
|
|
cfg->sync();
|
|
|
|
cfg->sync();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::toggleFontAutoRes()
|
|
|
|
void MainWidget::toggleFontAutoRes()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool c = tray->contextMenu()->isItemChecked( mnu_autores);
|
|
|
|
bool c = tray->contextMenu()->isItemChecked( mnu_autores);
|
|
|
@ -839,64 +838,52 @@ void MainWidget::toggleFontAutoRes()
|
|
|
|
cfg->writeEntry ("autoresfont", !c);
|
|
|
|
cfg->writeEntry ("autoresfont", !c);
|
|
|
|
cfg->sync();
|
|
|
|
cfg->sync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::toggleNumlock()
|
|
|
|
void MainWidget::toggleNumlock()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool p=numl->isOn();
|
|
|
|
send_key(numl->getKeyCode());
|
|
|
|
for ( unsigned a=0;a<numl_keys.size();a++ ) {
|
|
|
|
updateNumlock();
|
|
|
|
NumpadVButton *v = numl_keys[a];
|
|
|
|
|
|
|
|
v->numlockPressed(p);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void MainWidget::toggleCaps()
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::updateNumlock()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool p=caps->isOn();
|
|
|
|
bool state = numl->isOn();
|
|
|
|
for ( unsigned a=0;a<btns.size();a++ ) {
|
|
|
|
for (unsigned a = 0; a < numl_keys.size(); a++)
|
|
|
|
VButton *v = btns[a];
|
|
|
|
{
|
|
|
|
v->capsPressed(p);
|
|
|
|
NumpadVButton *v = numl_keys[a];
|
|
|
|
|
|
|
|
v->numlockPressed(state);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::toggleShift()
|
|
|
|
void MainWidget::toggleShift(unsigned int keycode)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool p=false;
|
|
|
|
send_key(keycode);
|
|
|
|
if ( lshft->isOn() || rshft->isOn() ) p=true;
|
|
|
|
updateShift();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for ( unsigned a=0;a<btns.size();a++ ) {
|
|
|
|
void MainWidget::updateShift()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool state = caps->isOn() ^ (lshift->isOn() || rshift->isOn());
|
|
|
|
|
|
|
|
for (unsigned a = 0; a < btns.size(); a++)
|
|
|
|
|
|
|
|
{
|
|
|
|
VButton *v = btns[a];
|
|
|
|
VButton *v = btns[a];
|
|
|
|
v->shiftPressed ( p );
|
|
|
|
v->shiftPressed(state);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::keyPress ( unsigned int a )
|
|
|
|
void MainWidget::keyPress ( unsigned int a )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
send_key ( a,true,true );
|
|
|
|
send_key(a);
|
|
|
|
bool reverse = false;
|
|
|
|
for (unsigned a = 0; a < mod_keys.size(); a++)
|
|
|
|
if (lshft->isOn() || rshft->isOn())
|
|
|
|
|
|
|
|
reverse=true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for ( unsigned a=0;a<mod_keys.size();a++ ) {
|
|
|
|
|
|
|
|
VButton *mod = ( VButton* ) mod_keys[a];
|
|
|
|
|
|
|
|
mod->setOn ( false );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (caps->isOn()) {
|
|
|
|
|
|
|
|
if (reverse) {
|
|
|
|
|
|
|
|
for (unsigned a=0;a<btns.size();a++) {
|
|
|
|
|
|
|
|
VButton *v = ( VButton* ) btns[a];
|
|
|
|
|
|
|
|
v->capsPressed(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
for (unsigned a=0;a<btns.size();a++)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
VButton *v = ( VButton* ) btns[a];
|
|
|
|
VButton *mod = mod_keys[a];
|
|
|
|
v->capsPressed(false);
|
|
|
|
mod->setOn(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Make sure the key labels are correctly updated
|
|
|
|
|
|
|
|
updateShift();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
void MainWidget::send_key(unsigned int keycode)
|
|
|
|
void MainWidget::send_key ( unsigned int keycode, bool press, bool release )
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Window curr_focus;
|
|
|
|
Window curr_focus;
|
|
|
|
int revert_to;
|
|
|
|
int revert_to;
|
|
|
@ -942,68 +929,52 @@ bool MainWidget::keyState ( int iKey )
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::queryModState()
|
|
|
|
void MainWidget::queryModState()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//printf("Scroll: %d\n",keyState(XK_Scroll_Lock,pDisplay));
|
|
|
|
|
|
|
|
//printf("Caps : %d\n",keyState(XK_Caps_Lock,pDisplay));
|
|
|
|
//printf("Caps : %d\n",keyState(XK_Caps_Lock,pDisplay));
|
|
|
|
//printf("Num : %d\n",keyState(XK_Num_Lock,pDisplay));
|
|
|
|
//printf("Num : %d\n",keyState(XK_Num_Lock,pDisplay));
|
|
|
|
bool caps_state = keyState(XK_Caps_Lock);
|
|
|
|
bool caps_state = keyState(XK_Caps_Lock);
|
|
|
|
bool numl_state = keyState ( XK_Num_Lock);
|
|
|
|
if (caps_state != caps->isOn())
|
|
|
|
|
|
|
|
{
|
|
|
|
if ( caps_state!=caps->isOn() ) {
|
|
|
|
|
|
|
|
caps->setOn(caps_state);
|
|
|
|
caps->setOn(caps_state);
|
|
|
|
toggleCaps();
|
|
|
|
updateShift();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( numl_state!= numl->isOn() ) {
|
|
|
|
|
|
|
|
|
|
|
|
bool numl_state = keyState(XK_Num_Lock);
|
|
|
|
|
|
|
|
if (numl_state != numl->isOn())
|
|
|
|
|
|
|
|
{
|
|
|
|
numl->setOn(numl_state);
|
|
|
|
numl->setOn(numl_state);
|
|
|
|
toggleNumlock();
|
|
|
|
updateNumlock();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::setupText(VButton& v)
|
|
|
|
void MainWidget::setupText(VButton& v)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
KeyCode keycode=v.getKeyCode();
|
|
|
|
KeyCode keycode=v.getKeyCode();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// lowercase text
|
|
|
|
KeySym keysym_l = XkbKeycodeToKeysym(display, keycode, 0, 0);
|
|
|
|
KeySym keysym_l = XkbKeycodeToKeysym(display, keycode, 0, 0);
|
|
|
|
|
|
|
|
TQString btn_text(TQChar((uint)keysym2ucs(keysym_l)));
|
|
|
|
KeySym keysym_u = XkbKeycodeToKeysym(display, keycode, 0, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long ret = keysym2ucs(keysym_l);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQString btn_text(TQChar((uint)ret));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v.setText(btn_text);
|
|
|
|
v.setText(btn_text);
|
|
|
|
|
|
|
|
|
|
|
|
TQString btn_upper(btn_text.upper());
|
|
|
|
// uppercase text
|
|
|
|
|
|
|
|
KeySym keysym_u = XkbKeycodeToKeysym(display, keycode, 0, 1);
|
|
|
|
if (btn_upper==btn_text) {
|
|
|
|
TQChar c((uint)keysym2ucs(keysym_u));
|
|
|
|
ret = keysym2ucs(keysym_u);
|
|
|
|
|
|
|
|
TQChar c((uint)ret);
|
|
|
|
|
|
|
|
if (c == '&')
|
|
|
|
if (c == '&')
|
|
|
|
|
|
|
|
{
|
|
|
|
v.setShiftText("&&");
|
|
|
|
v.setShiftText("&&");
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
v.setShiftText(c);
|
|
|
|
v.setShiftText(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
v.setShiftText(btn_upper);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWidget::mappingNotify(XMappingEvent *)
|
|
|
|
void MainWidget::mappingNotify(XMappingEvent *)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//TQTimer::singleShot( 1000, this, TQT_SLOT(test()) );
|
|
|
|
for (unsigned a = 0; a < btns.size(); a++)
|
|
|
|
//if (e)XRefreshKeyboardMapping(e);
|
|
|
|
{
|
|
|
|
|
|
|
|
VButton *v = btns[a];
|
|
|
|
//int index=0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (unsigned a=0;a<btns.size();a++) {
|
|
|
|
|
|
|
|
VButton *v = (VButton *)btns[a];
|
|
|
|
|
|
|
|
setupText(*v);
|
|
|
|
setupText(*v);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// for (int a=0;a<shft_btns.size();a++)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// VButton *v = (VButton *)shft_btns[a];
|
|
|
|
|
|
|
|
// setupText(*v);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KbdDock::KbdDock ( MainWidget *m )
|
|
|
|
KbdDock::KbdDock ( MainWidget *m )
|
|
|
@ -1914,13 +1885,3 @@ void KbdTray::mousePressEvent(TQMouseEvent *e)
|
|
|
|
|
|
|
|
|
|
|
|
#include "MainWidget.moc"
|
|
|
|
#include "MainWidget.moc"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|