Skip to content

Commit 48aff32

Browse files
committed
Clarify why not switch keyboard layout for languages that have IME mode
1 parent 382d0c2 commit 48aff32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Flow.Launcher.Infrastructure/Win32Helper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ public static unsafe void SwitchToEnglishKeyboardLayout(bool backupPrevious)
381381
var threadId = PInvoke.GetWindowThreadProcessId(PInvoke.GetForegroundWindow());
382382
if (threadId == 0) throw new Win32Exception(Marshal.GetLastWin32Error());
383383

384-
// If the current layout has an IME mode, disable it without switching to another layout
384+
// If the current layout has an IME mode, disable it without switching to another layout.
385+
// This is needed because for languages with IME mode, Flow Launcher just temporarily disables
386+
// the IME mode instead of switching to another layout.
385387
var currentLayout = PInvoke.GetKeyboardLayout(threadId);
386388
var currentLayoutCode = (uint)currentLayout.Value & KeyboardLayoutLoWord;
387389
if (ImeLanguageIds.Contains(currentLayoutCode))

0 commit comments

Comments
 (0)