Skip to content

Commit

Permalink
Ensure key captures work when WinCompose is disabled. Maybe related to
Browse files Browse the repository at this point in the history
  • Loading branch information
samhocevar committed Nov 26, 2020
1 parent e7e5bf2 commit 8f726d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/composer/Composer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ public static bool OnKey(WM ev, VK vk, SC sc, LLKHF flags)
// Remember when the user touched a key for the last time
m_last_key_time = DateTime.Now;

// Do nothing if we are disabled; NOTE: this disables stats, too
if (Settings.Disabled.Value)
return false;

// We need to check the keyboard layout before we save the dead
// key, otherwise we may be saving garbage.
KeyboardLayout.CheckForChanges();
Expand Down Expand Up @@ -197,7 +193,7 @@ private static bool OnKeyInternal(WM ev, VK vk, SC sc, LLKHF flags)
{
if (is_keyup)
Captured.Invoke(key);
return true;
goto exit_discard_key;
}

// Update statistics
Expand All @@ -218,6 +214,10 @@ private static bool OnKeyInternal(WM ev, VK vk, SC sc, LLKHF flags)
m_last_key = key;
}

// Do nothing if we are disabled
if (Settings.Disabled.Value)
goto exit_forward_key;

// If the special Synergy window has focus, we’re actually sending
// keystrokes to another computer; disable WinCompose. Same if it is
// a Cygwin X window.
Expand Down

0 comments on commit 8f726d6

Please sign in to comment.