mirror of https://github.com/debauchee/barrier.git
Integrated some changes from 1.2 branch.
This commit is contained in:
parent
42b4e2488a
commit
1bd227922e
|
@ -7,6 +7,26 @@
|
|||
<body class="main">
|
||||
<h3>Synergy News</h3>
|
||||
|
||||
<span class="date">Jan-26-2005</span> - Synergy 1.2.2 released
|
||||
|
||||
<p>
|
||||
Made following changes:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Fixed major OS X modifier key handling bug
|
||||
<li>Fixed handling of ISO_Level3_Shift on X11
|
||||
</ul>
|
||||
|
||||
<span class="date">Jan-04-2005</span> - Synergy 1.2.1 released
|
||||
|
||||
<p>
|
||||
Made following changes:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Fixed major OS X keyboard handling bug
|
||||
<li>Fixed some minor documentation bugs
|
||||
</ul>
|
||||
|
||||
<span class="date">Dec-30-2004</span> - Synergy 1.2.0 released
|
||||
|
||||
<p>
|
||||
|
|
|
@ -315,8 +315,17 @@ COSXKeyState::mapKey(Keystrokes& keys, KeyID id,
|
|||
// if the desired mask includes Alt or Control then match the
|
||||
// desired mask. this ensures that combinations like
|
||||
// Command+Shift+S use the Command and Shift modifiers and
|
||||
// those like Command+S do not use the shift modifier.
|
||||
if ((desiredMask & (KeyModifierControl | KeyModifierAlt)) != 0) {
|
||||
// those like Command+S do not use the shift modifier. do not
|
||||
// do this if the key to synthesize is a modifier key, otherwise
|
||||
// we'd apply modifiers to modifiers which breaks things (by
|
||||
// say, putting a Control press and release around a Control
|
||||
// press).
|
||||
if ((desiredMask & (KeyModifierControl | KeyModifierAlt)) != 0 &&
|
||||
id != kKeyShift_L && id != kKeyShift_R &&
|
||||
id != kKeyControl_L && id != kKeyControl_R &&
|
||||
id != kKeyAlt_L && id != kKeyAlt_R &&
|
||||
id != kKeySuper_L && id != kKeySuper_R &&
|
||||
id != kKeyMeta_L && id != kKeyMeta_R) {
|
||||
return addKeystrokes(keys, sequence.back().m_button,
|
||||
desiredMask,
|
||||
KeyModifierShift | KeyModifierSuper |
|
||||
|
|
|
@ -414,10 +414,41 @@ CXWindowsKeyState::updateKeysymMap()
|
|||
}
|
||||
|
||||
// get keysym and get/create key mapping
|
||||
const int keycodeIndex = keycode - minKeycode;
|
||||
const KeySym keysym = keysyms[keycodeIndex *
|
||||
int keycodeIndex = keycode - minKeycode;
|
||||
KeySym keysym = keysyms[keycodeIndex *
|
||||
keysymsPerKeycode + 0];
|
||||
|
||||
// prefer XK_ISO_Level3_Shift over XK_Mode_switch. newer
|
||||
// versions of X use the former only. we assume here that
|
||||
// if you have XK_ISO_Level3_Shift mapped then that's what
|
||||
// you want to use even if XK_Mode_switch is also mapped.
|
||||
if (j == 0 && keysym == XK_Mode_switch) {
|
||||
// sort modifiers->modifiermap for this modifier so
|
||||
// that a keycode mapped to XK_ISO_Level3_Shift appears
|
||||
// before those mapped to anything else. this one keycode
|
||||
// is enough so long as it's first because mapModifier in
|
||||
// CKeyState uses the first keycode in modifierKeys to
|
||||
// generate the key event for this modifier.
|
||||
KeyCode* keycodes = modifiers->modifiermap +
|
||||
i * keysPerModifier + j;
|
||||
for (unsigned int k = j + 1; k < keysPerModifier; ++k) {
|
||||
KeySym keysym2 = keysyms[(keycodes[k] - minKeycode) *
|
||||
keysymsPerKeycode + 0];
|
||||
if (keysym2 == XK_ISO_Level3_Shift) {
|
||||
// found an XK_ISO_Level3_Shift. swap it with
|
||||
// the keycode in index j.
|
||||
keycodes[j] = keycodes[k];
|
||||
keycodes[k] = keycode;
|
||||
|
||||
// now use the new first keycode
|
||||
keycode = keycodes[j];
|
||||
keycodeIndex = keycode - minKeycode;
|
||||
keysym = keysym2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get modifier mask if we haven't yet. this has the side
|
||||
// effect of setting the m_*Mask members.
|
||||
if (mask == 0) {
|
||||
|
|
Loading…
Reference in New Issue