From 4c308190789d7f5ffc940d70dd5ea8a002fa4b30 Mon Sep 17 00:00:00 2001 From: Roman Savochenko Date: Sun, 30 Jul 2017 10:48:57 +0200 Subject: Add brightness keys support The code partially taken from Qt4 This relates to bug 2775 Signed-off-by: Roman Savochenko --- src/kernel/qapplication_x11.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/kernel/qapplication_x11.cpp') diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 847d713ab..84dcefb22 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -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 }; -- cgit v1.2.3