Add brightness keys support

The code partially taken from Qt4
This relates to bug 2775

Signed-off-by: Roman Savochenko <rom_as@oscada.org>
(cherry picked from commit 4c30819078)
r14.0.x
Roman Savochenko 7 years ago committed by Slávek Banko
parent 4516caea75
commit a944a8634f

File diff suppressed because one or more lines are too long

@ -652,6 +652,11 @@ public:
Key_LaunchD = 0x10af,
Key_LaunchE = 0x10b0,
Key_LaunchF = 0x10b1,
Key_MonBrightnessUp = 0x010b2,
Key_MonBrightnessDown = 0x010b3,
Key_KeyboardLightOnOff = 0x010b4,
Key_KeyboardBrightnessUp = 0x010b5,
Key_KeyboardBrightnessDown = 0x010b6,
Key_MediaLast = 0x1fff,

File diff suppressed because one or more lines are too long

@ -726,6 +726,11 @@ public:
Key_LaunchD = 0x10af,
Key_LaunchE = 0x10b0,
Key_LaunchF = 0x10b1,
Key_MonBrightnessUp = 0x010b2,
Key_MonBrightnessDown = 0x010b3,
Key_KeyboardLightOnOff = 0x010b4,
Key_KeyboardBrightnessUp = 0x010b5,
Key_KeyboardBrightnessDown = 0x010b6,
Key_MediaLast = 0x1fff,

@ -4821,6 +4821,11 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
#define XF86XK_LaunchD 0x1008FF4D
#define XF86XK_LaunchE 0x1008FF4E
#define XF86XK_LaunchF 0x1008FF4F
#define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */
#define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */
#define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */
#define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */
#define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */
// end of XF86keysyms.h
@ -5019,6 +5024,11 @@ static const KeySym KeyTbl[] = { // keyboard mapping table
XF86XK_LaunchB, TQt::Key_LaunchD,
XF86XK_LaunchC, TQt::Key_LaunchE,
XF86XK_LaunchD, TQt::Key_LaunchF,
XF86XK_MonBrightnessUp, TQt::Key_MonBrightnessUp,
XF86XK_MonBrightnessDown, TQt::Key_MonBrightnessDown,
XF86XK_KbdLightOnOff, TQt::Key_KeyboardLightOnOff,
XF86XK_KbdBrightnessUp, TQt::Key_KeyboardBrightnessUp,
XF86XK_KbdBrightnessDown, TQt::Key_KeyboardBrightnessDown,
0, 0
};

@ -1140,6 +1140,11 @@ TQt::ButtonState TQKeyEvent::stateAfter() const
\value Key_LaunchD
\value Key_LaunchE
\value Key_LaunchF
\value Key_MonBrightnessUp
\value Key_MonBrightnessDown
\value Key_KeyboardLightOnOff
\value Key_KeyboardBrightnessUp
\value Key_KeyboardBrightnessDown
\value Key_MediaLast

@ -160,6 +160,11 @@ static struct {
{ TQt::Key_LaunchD, QT_TRANSLATE_NOOP( "TQAccel", "Launch (D)" ) },
{ TQt::Key_LaunchE, QT_TRANSLATE_NOOP( "TQAccel", "Launch (E)" ) },
{ TQt::Key_LaunchF, QT_TRANSLATE_NOOP( "TQAccel", "Launch (F)" ) },
{ TQt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP( "TQAccel", "Monitor Brightness Up" ) },
{ TQt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP( "TQAccel", "Monitor Brightness Down" ) },
{ TQt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP( "TQAccel", "Keyboard Light On Off" ) },
{ TQt::Key_KeyboardBrightnessUp,QT_TRANSLATE_NOOP( "TQAccel", "Keyboard Brightness Up" ) },
{ TQt::Key_KeyboardBrightnessDown, QT_TRANSLATE_NOOP( "TQAccel", "Keyboard Brightness Down" ) },
// --------------------------------------------------------------
// More consistent namings

@ -180,6 +180,11 @@ static struct {
{ TQt::Key_LaunchD, QT_TRANSLATE_NOOP( "TQAccel", "Launch (D)" ) },
{ TQt::Key_LaunchE, QT_TRANSLATE_NOOP( "TQAccel", "Launch (E)" ) },
{ TQt::Key_LaunchF, QT_TRANSLATE_NOOP( "TQAccel", "Launch (F)" ) },
{ TQt::Key_MonBrightnessUp, QT_TRANSLATE_NOOP( "TQAccel", "Monitor Brightness Up" ) },
{ TQt::Key_MonBrightnessDown, QT_TRANSLATE_NOOP( "TQAccel", "Monitor Brightness Down" ) },
{ TQt::Key_KeyboardLightOnOff, QT_TRANSLATE_NOOP( "TQAccel", "Keyboard Light On Off" ) },
{ TQt::Key_KeyboardBrightnessUp, QT_TRANSLATE_NOOP( "TQAccel", "Keyboard Brightness Up" ) },
{ TQt::Key_KeyboardBrightnessDown, QT_TRANSLATE_NOOP( "TQAccel", "Keyboard Brightness Down" ) },
// --------------------------------------------------------------
// More consistent namings

Loading…
Cancel
Save