Merge changes from v1.8.8-rc1
This commit is contained in:
commit
680c9b4078
|
@ -74,11 +74,6 @@ endif()
|
||||||
|
|
||||||
# Depending on the platform, pass in the required defines.
|
# Depending on the platform, pass in the required defines.
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
|
|
||||||
# warnings as errors:
|
|
||||||
# we have a problem with people checking in code with warnings.
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-unused-local-typedef")
|
|
||||||
|
|
||||||
if (NOT APPLE)
|
if (NOT APPLE)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
endif()
|
endif()
|
||||||
|
|
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
v1.8.8-rc1
|
||||||
|
==========
|
||||||
|
Bug #5196 - Some keys on Korean and Japanese keyboards have the same keycode
|
||||||
|
Bug #5578 - Pressing Hangul key results in alt+'a'
|
||||||
|
Bug #5785 - Can't switch screens when cursor is in a corner
|
||||||
|
Bug #3992 - macOS: Dragging is broken in Unity 3D
|
||||||
|
Bug #5075 - macOS: Build fails on macOS 10.9 due to unknown compiler flag
|
||||||
|
Bug #5809 - macOS: No version number is shown in the App Info dialog
|
||||||
|
Bug #3197 - Linux: switchDoubleTap option is not working
|
||||||
|
Bug #4477 - Linux: Mouse buttons higher than id 10 result in crash
|
||||||
|
Bug #5832 - Linux: Screen size misdetected on multi-monitor display
|
||||||
|
Enhancement #4504 - Improved Korean language description
|
||||||
|
Enhancement #5525 - Added support for precise screen positioning in config file
|
||||||
|
Enhancement #4290 - Windows: Removed annoying alt+print screen functionality
|
||||||
|
|
||||||
v1.8.7-stable
|
v1.8.7-stable
|
||||||
=============
|
=============
|
||||||
Bug #5784 - Edition changes when reopening GUI
|
Bug #5784 - Edition changes when reopening GUI
|
||||||
|
|
|
@ -42,5 +42,5 @@
|
||||||
<language ietfCode="zh-CN" name="中文 (简体)" />
|
<language ietfCode="zh-CN" name="中文 (简体)" />
|
||||||
<language ietfCode="zh-TW" name="中文 (繁體)" />
|
<language ietfCode="zh-TW" name="中文 (繁體)" />
|
||||||
<language ietfCode="ja-JP" name="日本語" />
|
<language ietfCode="ja-JP" name="日本語" />
|
||||||
<language ietfCode="ko" name="한국의" />
|
<language ietfCode="ko" name="한국어" />
|
||||||
</languages>
|
</languages>
|
||||||
|
|
|
@ -1,20 +1,28 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>6.0</string>
|
<string>English</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>NSApplication</string>
|
<string>Synergy</string>
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>Synergy.icns</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>Synergy</string>
|
<string>Synergy</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>Synergy.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>synergy</string>
|
<string>synergy</string>
|
||||||
</dict>
|
<!-- TODO: Fix this in v2.0 //-->
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Synergy</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.8.8</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.8.8</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>© 2012-2016, Symless Ltd</string>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -119,8 +119,8 @@ int waitForTray()
|
||||||
if (++trayAttempts > TRAY_RETRY_COUNT)
|
if (++trayAttempts > TRAY_RETRY_COUNT)
|
||||||
{
|
{
|
||||||
QMessageBox::critical(NULL, "Synergy",
|
QMessageBox::critical(NULL, "Synergy",
|
||||||
QObject::tr("System tray is unavailable, quitting."));
|
QObject::tr("System tray is unavailable, don't close your window."));
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QThreadImpl::msleep(TRAY_RETRY_WAIT);
|
QThreadImpl::msleep(TRAY_RETRY_WAIT);
|
||||||
|
|
|
@ -61,11 +61,11 @@ const KeyID MSWindowsKeyState::s_virtualKey[] =
|
||||||
/* 0x012 */ { kKeyAlt_L }, // VK_MENU
|
/* 0x012 */ { kKeyAlt_L }, // VK_MENU
|
||||||
/* 0x013 */ { kKeyPause }, // VK_PAUSE
|
/* 0x013 */ { kKeyPause }, // VK_PAUSE
|
||||||
/* 0x014 */ { kKeyCapsLock }, // VK_CAPITAL
|
/* 0x014 */ { kKeyCapsLock }, // VK_CAPITAL
|
||||||
/* 0x015 */ { kKeyHangulKana }, // VK_HANGUL, VK_KANA
|
/* 0x015 */ { kKeyKana }, // VK_HANGUL, VK_KANA
|
||||||
/* 0x016 */ { kKeyNone }, // undefined
|
/* 0x016 */ { kKeyNone }, // undefined
|
||||||
/* 0x017 */ { kKeyNone }, // VK_JUNJA
|
/* 0x017 */ { kKeyNone }, // VK_JUNJA
|
||||||
/* 0x018 */ { kKeyNone }, // VK_FINAL
|
/* 0x018 */ { kKeyNone }, // VK_FINAL
|
||||||
/* 0x019 */ { kKeyHanjaKanzi }, // VK_KANJI
|
/* 0x019 */ { kKeyKanzi }, // VK_HANJA, VK_KANJI
|
||||||
/* 0x01a */ { kKeyNone }, // undefined
|
/* 0x01a */ { kKeyNone }, // undefined
|
||||||
/* 0x01b */ { kKeyEscape }, // VK_ESCAPE
|
/* 0x01b */ { kKeyEscape }, // VK_ESCAPE
|
||||||
/* 0x01c */ { kKeyHenkan }, // VK_CONVERT
|
/* 0x01c */ { kKeyHenkan }, // VK_CONVERT
|
||||||
|
@ -318,11 +318,11 @@ const KeyID MSWindowsKeyState::s_virtualKey[] =
|
||||||
/* 0x112 */ { kKeyAlt_R }, // VK_MENU
|
/* 0x112 */ { kKeyAlt_R }, // VK_MENU
|
||||||
/* 0x113 */ { kKeyNone }, // VK_PAUSE
|
/* 0x113 */ { kKeyNone }, // VK_PAUSE
|
||||||
/* 0x114 */ { kKeyNone }, // VK_CAPITAL
|
/* 0x114 */ { kKeyNone }, // VK_CAPITAL
|
||||||
/* 0x115 */ { kKeyNone }, // VK_KANA
|
/* 0x115 */ { kKeyHangul }, // VK_HANGUL
|
||||||
/* 0x116 */ { kKeyNone }, // VK_HANGUL
|
/* 0x116 */ { kKeyNone }, // undefined
|
||||||
/* 0x117 */ { kKeyNone }, // VK_JUNJA
|
/* 0x117 */ { kKeyNone }, // VK_JUNJA
|
||||||
/* 0x118 */ { kKeyNone }, // VK_FINAL
|
/* 0x118 */ { kKeyNone }, // VK_FINAL
|
||||||
/* 0x119 */ { kKeyNone }, // VK_KANJI
|
/* 0x119 */ { kKeyHanja }, // VK_HANJA
|
||||||
/* 0x11a */ { kKeyNone }, // undefined
|
/* 0x11a */ { kKeyNone }, // undefined
|
||||||
/* 0x11b */ { kKeyNone }, // VK_ESCAPE
|
/* 0x11b */ { kKeyNone }, // VK_ESCAPE
|
||||||
/* 0x11c */ { kKeyNone }, // VK_CONVERT
|
/* 0x11c */ { kKeyNone }, // VK_CONVERT
|
||||||
|
@ -728,6 +728,10 @@ MSWindowsKeyState::mapKeyFromEvent(WPARAM charAndVirtKey,
|
||||||
// that so we clear it.
|
// that so we clear it.
|
||||||
active &= ~s_controlAlt;
|
active &= ~s_controlAlt;
|
||||||
}
|
}
|
||||||
|
if (id == kKeyHangul) {
|
||||||
|
// If shift-space is used to change input mode, clear shift modifier.
|
||||||
|
active &= ~KeyModifierShift;
|
||||||
|
}
|
||||||
*maskOut = active;
|
*maskOut = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1071,13 +1075,8 @@ MSWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add alt+printscreen
|
|
||||||
if (m_buttonToVK[0x54u] == 0) {
|
|
||||||
m_buttonToVK[0x54u] = VK_SNAPSHOT;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set virtual key to button table
|
// set virtual key to button table
|
||||||
if (GetKeyboardLayout(0) == m_groups[g]) {
|
if (activeLayout == m_groups[g]) {
|
||||||
for (KeyButton i = 0; i < 512; ++i) {
|
for (KeyButton i = 0; i < 512; ++i) {
|
||||||
if (m_buttonToVK[i] != 0) {
|
if (m_buttonToVK[i] != 0) {
|
||||||
if (m_virtualKeyToButton[m_buttonToVK[i]] == 0) {
|
if (m_virtualKeyToButton[m_buttonToVK[i]] == 0) {
|
||||||
|
@ -1339,8 +1338,20 @@ MSWindowsKeyState::setWindowGroup(SInt32 group)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyID
|
KeyID
|
||||||
MSWindowsKeyState::getKeyID(UINT virtualKey, KeyButton button)
|
MSWindowsKeyState::getKeyID(UINT virtualKey, KeyButton button) const
|
||||||
{
|
{
|
||||||
|
// Some virtual keycodes have same values.
|
||||||
|
// VK_HANGUL == VK_KANA, VK_HANJA == NK_KANJI
|
||||||
|
// which are used to change the input mode of IME.
|
||||||
|
// But they have different X11 keysym. So we should distinguish them.
|
||||||
|
if ((LOWORD(m_keyLayout) & 0xffffu) == 0x0412u) { // 0x0412 : Korean Locale ID
|
||||||
|
if (virtualKey == VK_HANGUL || virtualKey == VK_HANJA) {
|
||||||
|
// If shift-space is used to change the input mode,
|
||||||
|
// the extented bit is not set. So add it to get right key id.
|
||||||
|
button |= 0x100u;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((button & 0x100u) != 0) {
|
if ((button & 0x100u) != 0) {
|
||||||
virtualKey += 0x100u;
|
virtualKey += 0x100u;
|
||||||
}
|
}
|
||||||
|
@ -1392,3 +1403,4 @@ MSWindowsKeyState::addKeyEntry(synergy::KeyMap& keyMap, synergy::KeyMap::KeyItem
|
||||||
m_keyToVKMap[item.m_id] = static_cast<UINT>(item.m_client);
|
m_keyToVKMap[item.m_id] = static_cast<UINT>(item.m_client);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ public:
|
||||||
(button should include the extended key bit), or kKeyNone if there is
|
(button should include the extended key bit), or kKeyNone if there is
|
||||||
no such key.
|
no such key.
|
||||||
*/
|
*/
|
||||||
static KeyID getKeyID(UINT virtualKey, KeyButton button);
|
KeyID getKeyID(UINT virtualKey, KeyButton button) const;
|
||||||
|
|
||||||
//! Map button to virtual key
|
//! Map button to virtual key
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -484,6 +484,22 @@ OSXScreen::postMouseEvent(CGPoint& pos) const
|
||||||
CGEventFlags modifiers = m_keyState->getModifierStateAsOSXFlags();
|
CGEventFlags modifiers = m_keyState->getModifierStateAsOSXFlags();
|
||||||
CGEventSetFlags(event, modifiers);
|
CGEventSetFlags(event, modifiers);
|
||||||
|
|
||||||
|
// Set movement deltas to fix issues with certain 3D programs
|
||||||
|
SInt64 deltaX = pos.x;
|
||||||
|
deltaX -= m_xCursor;
|
||||||
|
|
||||||
|
SInt64 deltaY = pos.y;
|
||||||
|
deltaY -= m_yCursor;
|
||||||
|
|
||||||
|
CGEventSetIntegerValueField(event, kCGMouseEventDeltaX, deltaX);
|
||||||
|
CGEventSetIntegerValueField(event, kCGMouseEventDeltaY, deltaY);
|
||||||
|
|
||||||
|
double deltaFX = deltaX;
|
||||||
|
double deltaFY = deltaY;
|
||||||
|
|
||||||
|
CGEventSetDoubleValueField(event, kCGMouseEventDeltaX, deltaFX);
|
||||||
|
CGEventSetDoubleValueField(event, kCGMouseEventDeltaY, deltaFY);
|
||||||
|
|
||||||
CGEventPost(kCGHIDEventTap, event);
|
CGEventPost(kCGHIDEventTap, event);
|
||||||
|
|
||||||
CFRelease(event);
|
CFRelease(event);
|
||||||
|
|
|
@ -160,15 +160,12 @@ XWindowsScreen::XWindowsScreen(
|
||||||
|
|
||||||
// primary/secondary screen only initialization
|
// primary/secondary screen only initialization
|
||||||
if (m_isPrimary) {
|
if (m_isPrimary) {
|
||||||
// start watching for events on other windows
|
|
||||||
selectEvents(m_root);
|
|
||||||
m_xi2detected = detectXI2();
|
|
||||||
|
|
||||||
if (m_xi2detected) {
|
|
||||||
#ifdef HAVE_XI2
|
#ifdef HAVE_XI2
|
||||||
|
m_xi2detected = detectXI2();
|
||||||
|
if (m_xi2detected) {
|
||||||
selectXIRawMotion();
|
selectXIRawMotion();
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// start watching for events on other windows
|
// start watching for events on other windows
|
||||||
selectEvents(m_root);
|
selectEvents(m_root);
|
||||||
|
@ -827,7 +824,7 @@ void
|
||||||
XWindowsScreen::fakeMouseButton(ButtonID button, bool press)
|
XWindowsScreen::fakeMouseButton(ButtonID button, bool press)
|
||||||
{
|
{
|
||||||
const unsigned int xButton = mapButtonToX(button);
|
const unsigned int xButton = mapButtonToX(button);
|
||||||
if (xButton != 0) {
|
if (xButton > 0 && xButton < 11) {
|
||||||
XTestFakeButtonEvent(m_display, xButton,
|
XTestFakeButtonEvent(m_display, xButton,
|
||||||
press ? True : False, CurrentTime);
|
press ? True : False, CurrentTime);
|
||||||
XFlush(m_display);
|
XFlush(m_display);
|
||||||
|
@ -977,22 +974,6 @@ XWindowsScreen::saveShape()
|
||||||
m_w = WidthOfScreen(DefaultScreenOfDisplay(m_display));
|
m_w = WidthOfScreen(DefaultScreenOfDisplay(m_display));
|
||||||
m_h = HeightOfScreen(DefaultScreenOfDisplay(m_display));
|
m_h = HeightOfScreen(DefaultScreenOfDisplay(m_display));
|
||||||
|
|
||||||
#if HAVE_X11_EXTENSIONS_XRANDR_H
|
|
||||||
if (m_xrandr){
|
|
||||||
int numSizes;
|
|
||||||
XRRScreenSize* xrrs;
|
|
||||||
Rotation rotation;
|
|
||||||
xrrs = XRRSizes(m_display, DefaultScreen(m_display), &numSizes);
|
|
||||||
XRRRotations(m_display, DefaultScreen(m_display), &rotation);
|
|
||||||
if (xrrs != NULL) {
|
|
||||||
if (rotation & (RR_Rotate_90|RR_Rotate_270) ){
|
|
||||||
m_w = xrrs->height;
|
|
||||||
m_h = xrrs->width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// get center of default screen
|
// get center of default screen
|
||||||
m_xCenter = m_x + (m_w >> 1);
|
m_xCenter = m_x + (m_w >> 1);
|
||||||
m_yCenter = m_y + (m_h >> 1);
|
m_yCenter = m_y + (m_h >> 1);
|
||||||
|
@ -1300,7 +1281,7 @@ XWindowsScreen::handleSystemEvent(const Event& event, void*)
|
||||||
// handle the event ourself
|
// handle the event ourself
|
||||||
switch (xevent->type) {
|
switch (xevent->type) {
|
||||||
case CreateNotify:
|
case CreateNotify:
|
||||||
if (m_isPrimary) {
|
if (m_isPrimary && !m_xi2detected) {
|
||||||
// select events on new window
|
// select events on new window
|
||||||
selectEvents(xevent->xcreatewindow.window);
|
selectEvents(xevent->xcreatewindow.window);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2096,11 +2096,11 @@ ConfigReadContext::parseInterval(const ArgList& args) const
|
||||||
}
|
}
|
||||||
|
|
||||||
char* end;
|
char* end;
|
||||||
long startValue = strtol(args[0].c_str(), &end, 10);
|
double startValue = strtod(args[0].c_str(), &end);
|
||||||
if (end[0] != '\0') {
|
if (end[0] != '\0') {
|
||||||
throw XConfigRead(*this, "invalid interval \"%{1}\"", concatArgs(args));
|
throw XConfigRead(*this, "invalid interval \"%{1}\"", concatArgs(args));
|
||||||
}
|
}
|
||||||
long endValue = strtol(args[1].c_str(), &end, 10);
|
double endValue = strtod(args[1].c_str(), &end);
|
||||||
if (end[0] != '\0') {
|
if (end[0] != '\0') {
|
||||||
throw XConfigRead(*this, "invalid interval \"%{1}\"", concatArgs(args));
|
throw XConfigRead(*this, "invalid interval \"%{1}\"", concatArgs(args));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1766,29 +1766,42 @@ Server::onMouseMovePrimary(SInt32 x, SInt32 y)
|
||||||
}
|
}
|
||||||
|
|
||||||
// see if we should change screens
|
// see if we should change screens
|
||||||
EDirection dir;
|
// when the cursor is in a corner, there may be a screen either
|
||||||
|
// horizontally or vertically. check both directions.
|
||||||
|
EDirection dirh = kNoDirection, dirv = kNoDirection;
|
||||||
|
SInt32 xh = x, yv = y;
|
||||||
if (x < ax + zoneSize) {
|
if (x < ax + zoneSize) {
|
||||||
x -= zoneSize;
|
xh -= zoneSize;
|
||||||
dir = kLeft;
|
dirh = kLeft;
|
||||||
}
|
}
|
||||||
else if (x >= ax + aw - zoneSize) {
|
else if (x >= ax + aw - zoneSize) {
|
||||||
x += zoneSize;
|
xh += zoneSize;
|
||||||
dir = kRight;
|
dirh = kRight;
|
||||||
}
|
}
|
||||||
else if (y < ay + zoneSize) {
|
if (y < ay + zoneSize) {
|
||||||
y -= zoneSize;
|
yv -= zoneSize;
|
||||||
dir = kTop;
|
dirv = kTop;
|
||||||
}
|
}
|
||||||
else if (y >= ay + ah - zoneSize) {
|
else if (y >= ay + ah - zoneSize) {
|
||||||
y += zoneSize;
|
yv += zoneSize;
|
||||||
dir = kBottom;
|
dirv = kBottom;
|
||||||
}
|
}
|
||||||
else {
|
if (dirh == kNoDirection && dirv == kNoDirection) {
|
||||||
// still on local screen
|
// still on local screen
|
||||||
noSwitch(x, y);
|
noSwitch(x, y);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check both horizontally and vertically
|
||||||
|
EDirection dirs[] = {dirh, dirv};
|
||||||
|
SInt32 xs[] = {xh, x}, ys[] = {y, yv};
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
EDirection dir = dirs[i];
|
||||||
|
if (dir == kNoDirection) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
x = xs[i], y = ys[i];
|
||||||
|
|
||||||
// get jump destination
|
// get jump destination
|
||||||
BaseClientProxy* newScreen = mapToNeighbor(m_active, dir, x, y);
|
BaseClientProxy* newScreen = mapToNeighbor(m_active, dir, x, y);
|
||||||
|
|
||||||
|
@ -1813,6 +1826,7 @@ Server::onMouseMovePrimary(SInt32 x, SInt32 y)
|
||||||
m_waitDragInfoThread = true;
|
m_waitDragInfoThread = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,10 +110,12 @@ static const KeyID kKeyScrollLock = 0xEF14;
|
||||||
static const KeyID kKeySysReq = 0xEF15;
|
static const KeyID kKeySysReq = 0xEF15;
|
||||||
static const KeyID kKeyEscape = 0xEF1B;
|
static const KeyID kKeyEscape = 0xEF1B;
|
||||||
static const KeyID kKeyHenkan = 0xEF23; /* Start/Stop Conversion */
|
static const KeyID kKeyHenkan = 0xEF23; /* Start/Stop Conversion */
|
||||||
static const KeyID kKeyHangulKana = 0xEF26; /* Hangul, Kana */
|
static const KeyID kKeyKana = 0xEF26; /* Kana */
|
||||||
static const KeyID kKeyHiraganaKatakana = 0xEF27; /* Hiragana/Katakana toggle */
|
static const KeyID kKeyHiraganaKatakana = 0xEF27; /* Hiragana/Katakana toggle */
|
||||||
static const KeyID kKeyZenkaku = 0xEF2A; /* Zenkaku/Hankaku */
|
static const KeyID kKeyZenkaku = 0xEF2A; /* Zenkaku/Hankaku */
|
||||||
static const KeyID kKeyHanjaKanzi = 0xEF2A; /* Hanja, Kanzi */
|
static const KeyID kKeyKanzi = 0xEF2A; /* Kanzi */
|
||||||
|
static const KeyID kKeyHangul = 0xEF31; /* Hangul */
|
||||||
|
static const KeyID kKeyHanja = 0xEF34; /* Hanja */
|
||||||
static const KeyID kKeyDelete = 0xEFFF; /* Delete, rubout */
|
static const KeyID kKeyDelete = 0xEFFF; /* Delete, rubout */
|
||||||
|
|
||||||
// cursor control
|
// cursor control
|
||||||
|
|
|
@ -46,7 +46,7 @@ extern "C" {
|
||||||
#error "Can't define both USYNERGY_LITTLE_ENDIAN and USYNERGY_BIG_ENDIAN"
|
#error "Can't define both USYNERGY_LITTLE_ENDIAN and USYNERGY_BIG_ENDIAN"
|
||||||
#elif !defined(USYNERGY_LITTLE_ENDIAN) && !defined(USYNERGY_BIG_ENDIAN)
|
#elif !defined(USYNERGY_LITTLE_ENDIAN) && !defined(USYNERGY_BIG_ENDIAN)
|
||||||
/* Attempt to auto detect */
|
/* Attempt to auto detect */
|
||||||
#if defined(__LITTLE_ENDIAN__) || defined(LITTLE_ENDIAN) || (_BYTE_ORDER == _LITTLE_ENDIAN)
|
#if defined(__LITTLE_ENDIAN__) || defined(LITTLE_ENDIAN)
|
||||||
#define USYNERGY_LITTLE_ENDIAN
|
#define USYNERGY_LITTLE_ENDIAN
|
||||||
#elif defined(__BIG_ENDIAN__) || defined(BIG_ENDIAN) || (_BYTE_ORDER == _BIG_ENDIAN)
|
#elif defined(__BIG_ENDIAN__) || defined(BIG_ENDIAN) || (_BYTE_ORDER == _BIG_ENDIAN)
|
||||||
#define USYNERGY_BIG_ENDIAN
|
#define USYNERGY_BIG_ENDIAN
|
||||||
|
|
|
@ -121,3 +121,24 @@ TEST_F(MSWindowsKeyStateTests, saveModifiers_noModifiers_savedModifiers0)
|
||||||
ASSERT_EQ(0, keyState.getSavedModifiers());
|
ASSERT_EQ(0, keyState.getSavedModifiers());
|
||||||
delete desks;
|
delete desks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(MSWindowsKeyStateTests, testKoreanLocale_inputModeKey_resultCorrectKeyID)
|
||||||
|
{
|
||||||
|
NiceMock<MockEventQueue> eventQueue;
|
||||||
|
MSWindowsDesks* desks = newDesks(&eventQueue);
|
||||||
|
MockKeyMap keyMap;
|
||||||
|
MSWindowsKeyState keyState(desks, getEventTarget(), &eventQueue, keyMap);
|
||||||
|
|
||||||
|
keyState.setKeyLayout((HKL)0x00000412u); // for ko-KR local ID
|
||||||
|
ASSERT_EQ(0xEF31, keyState.getKeyID(0x15u, 0x1f2u)); // VK_HANGUL from Hangul key
|
||||||
|
ASSERT_EQ(0xEF34, keyState.getKeyID(0x19u, 0x1f1u)); // VK_HANJA from Hanja key
|
||||||
|
ASSERT_EQ(0xEF31, keyState.getKeyID(0x15u, 0x11du)); // VK_HANGUL from R-Alt key
|
||||||
|
ASSERT_EQ(0xEF34, keyState.getKeyID(0x19u, 0x138u)); // VK_HANJA from R-Ctrl key
|
||||||
|
|
||||||
|
keyState.setKeyLayout((HKL)0x00000411); // for ja-jp locale ID
|
||||||
|
ASSERT_EQ(0xEF26, keyState.getKeyID(0x15u, 0x1du)); // VK_KANA
|
||||||
|
ASSERT_EQ(0xEF2A, keyState.getKeyID(0x19u, 0x38u)); // VK_KANJI
|
||||||
|
|
||||||
|
delete desks;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue