#3305 Added brightness up and down support
This commit is contained in:
parent
b62de406e2
commit
67f14da691
|
@ -1475,6 +1475,7 @@ XWindowsScreen::onKeyPress(XKeyEvent& xkey)
|
||||||
keycode = static_cast<KeyButton>(m_lastKeycode);
|
keycode = static_cast<KeyButton>(m_lastKeycode);
|
||||||
if (keycode == 0) {
|
if (keycode == 0) {
|
||||||
// no keycode
|
// no keycode
|
||||||
|
LOG((CLOG_DEBUG1 "event: KeyPress no keycode"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1489,6 +1490,9 @@ XWindowsScreen::onKeyPress(XKeyEvent& xkey)
|
||||||
false, false, key, mask, 1, keycode);
|
false, false, key, mask, 1, keycode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
LOG((CLOG_DEBUG1 "can't map keycode to key id"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1862,8 +1866,12 @@ XWindowsScreen::mapKeyFromX(XKeyEvent* event) const
|
||||||
XLookupString(event, dummy, 0, &keysym, NULL);
|
XLookupString(event, dummy, 0, &keysym, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG((CLOG_DEBUG2 "mapped code=%d to keysym=0x%04x", event->keycode, keysym));
|
||||||
|
|
||||||
// convert key
|
// convert key
|
||||||
return XWindowsUtil::mapKeySymToKeyID(keysym);
|
KeyID result = CXWindowsUtil::mapKeySymToKeyID(keysym);
|
||||||
|
LOG((CLOG_DEBUG2 "mapped keysym=0x%04x to keyID=%d", keysym, result));
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonID
|
ButtonID
|
||||||
|
|
|
@ -1250,7 +1250,7 @@ XK_uhorn
|
||||||
// map "Internet" keys to KeyIDs
|
// map "Internet" keys to KeyIDs
|
||||||
static const KeySym s_map1008FF[] =
|
static const KeySym s_map1008FF[] =
|
||||||
{
|
{
|
||||||
/* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
/* 0x00 */ 0, 0, kKeyBrightnessUp, kKeyBrightnessDown, 0, 0, 0, 0,
|
||||||
/* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
/* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
/* 0x10 */ 0, kKeyAudioDown, kKeyAudioMute, kKeyAudioUp,
|
/* 0x10 */ 0, kKeyAudioDown, kKeyAudioMute, kKeyAudioUp,
|
||||||
/* 0x14 */ kKeyAudioPlay, kKeyAudioStop, kKeyAudioPrev, kKeyAudioNext,
|
/* 0x14 */ kKeyAudioPlay, kKeyAudioStop, kKeyAudioPrev, kKeyAudioNext,
|
||||||
|
@ -1260,7 +1260,7 @@ static const KeySym s_map1008FF[] =
|
||||||
/* 0x30 */ kKeyWWWFavorites, 0, kKeyAppMedia, 0, 0, 0, 0, 0,
|
/* 0x30 */ kKeyWWWFavorites, 0, kKeyAppMedia, 0, 0, 0, 0, 0,
|
||||||
/* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
/* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
/* 0x40 */ kKeyAppUser1, kKeyAppUser2, 0, 0, 0, 0, 0, 0,
|
/* 0x40 */ kKeyAppUser1, kKeyAppUser2, 0, 0, 0, 0, 0, 0,
|
||||||
/* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
/* 0x48 */ 0, 0, kKeyExposeDesktop, kKeyExposeApp, 0, 0, 0, 0,
|
||||||
/* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
/* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
/* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
/* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
/* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
/* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
|
@ -280,6 +280,10 @@ static const KeyID kKeyAppMail = 0xE0B4;
|
||||||
static const KeyID kKeyAppMedia = 0xE0B5;
|
static const KeyID kKeyAppMedia = 0xE0B5;
|
||||||
static const KeyID kKeyAppUser1 = 0xE0B6;
|
static const KeyID kKeyAppUser1 = 0xE0B6;
|
||||||
static const KeyID kKeyAppUser2 = 0xE0B7;
|
static const KeyID kKeyAppUser2 = 0xE0B7;
|
||||||
|
static const KeyID kKeyBrightnessDown = 0xE0B8;
|
||||||
|
static const KeyID kKeyBrightnessUp = 0xE0B9;
|
||||||
|
static const KeyID kKeyExposeDesktop = 0xE0C0;
|
||||||
|
static const KeyID kKeyExposeApp = 0xE0C1;
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue