From 2af99da072d82ae809ef57f83911a7f4c45da1f5 Mon Sep 17 00:00:00 2001 From: Ray-V Date: Mon, 15 Feb 2021 12:02:50 +0900 Subject: Add RWIN key and set both Win keys to non-toggle for xmodmap. Signed-off-by: Ray-V Signed-off-by: Michele Calgaro --- src/MainWidget.cpp | 34 +++++++++++++++++++++++----------- src/MainWidget.h | 3 ++- 2 files changed, 25 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/MainWidget.cpp b/src/MainWidget.cpp index be6aad5..8bbe5a3 100644 --- a/src/MainWidget.cpp +++ b/src/MainWidget.cpp @@ -315,19 +315,20 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const lctrl->res(); - win = new VButton ( this,"" ); - win->resize ( 45,30 ); - win->move ( 5+lctrl->x() +lctrl->width(), sty+ ( 5*35 ) ); - win->setText ( "Win" ); - win->setKeyCode ( 115 ); - win->setToggleButton ( true ); - mod_keys.append ( win ); - win->res(); + lwin = new VButton ( this,"" ); + lwin->resize ( 50,30 ); + lwin->move ( lctrl->x() +lctrl->width() +5, sty+ ( 5*35 ) ); + lwin->setText ( "LWin" ); + lwin->setKeyCode ( 133 ); + lwin->setToggleButton ( false ); + connect ( lwin, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); + other_keys.append( lwin ); + lwin->res(); lalt = new VButton ( this,"" ); lalt->resize ( 45,30 ); - lalt->move ( 5+win->x() +win->width(), sty+ ( 5*35 ) ); + lalt->move ( lwin->x() +lwin->width() +5, sty+ ( 5*35 ) ); lalt->setText ( "Alt" ); lalt->setKeyCode ( 64 ); lalt->setToggleButton ( true ); @@ -353,9 +354,20 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const ralt->res(); + rwin = new VButton ( this,"" ); + rwin->resize ( 50,30 ); + rwin->move ( ralt->x() +ralt->width() +5, sty+ ( 5*35 ) ); + rwin->setText ( "RWin" ); + rwin->setKeyCode ( 134 ); + rwin->setToggleButton ( false ); + connect ( rwin, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) ); + other_keys.append( rwin ); + rwin->res(); + + mnu = new VButton ( this,"" ); - mnu->resize ( 45,30 ); - mnu->move ( 5+ralt->x() +ralt->width(), sty+ ( 5*35 ) ); + mnu->resize ( 50,30 ); + mnu->move ( rwin->x() +rwin->width() +5, sty+ ( 5*35 ) ); mnu->setText ( "Menu" ); mnu->setKeyCode ( 117 ); mnu->setToggleButton ( false ); diff --git a/src/MainWidget.h b/src/MainWidget.h index ba5b8ae..e2eb947 100644 --- a/src/MainWidget.h +++ b/src/MainWidget.h @@ -94,7 +94,8 @@ private: VButton *lalt; VButton *ralt; - VButton *win; + VButton *lwin; + VButton *rwin; VButton *mnu; VButton *numl; -- cgit v1.2.1