ImeInterop 0.1.2

dotnet add package ImeInterop --version 0.1.2
                    
NuGet\Install-Package ImeInterop -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ImeInterop" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ImeInterop" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="ImeInterop" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ImeInterop --version 0.1.2
                    
#r "nuget: ImeInterop, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=ImeInterop&version=0.1.2
                    
Install ImeInterop as a Cake Addin
#tool nuget:?package=ImeInterop&version=0.1.2
                    
Install ImeInterop as a Cake Tool

ImeInterop

A lightweight Windows Forms library for capturing IME composition messages (e.g. Korean, Japanese, Chinese input) in real time.
Supports multiple controls via centralized management.


✨ Features

  • Hook WM_IME_COMPOSITION and related IME messages in WinForms
  • Capture live composition text (조합 중 문자열), including empty string updates during deletion
  • Detect composition end via both WM_IME_ENDCOMPOSITION and when composition string is cleared
  • Use Unicode-safe ImmGetCompositionStringW API for accurate multi-language IME support
  • Handle IME start / end events reliably
  • Works with multiple controls via ImeManager
  • No external dependencies

🔧 Usage Example

var imeManager = new ImeManager();
imeManager.Attach(textBox1,
    onComposition: (s, e) => Console.WriteLine("Composing: " + e.CompositionText),
    onStart: (s, _) => Console.WriteLine("IME started"),
    onEnd: (s, _) => Console.WriteLine("IME ended"));

🧠 IME Composition Flow

  • OnImeStartComposition: Triggered when composition begins (WM_IME_STARTCOMPOSITION)
  • OnImeComposition: Triggered on every composition update — including empty string (e.g. user pressed Backspace)
  • OnImeEndComposition: Triggered either:
    • When WM_IME_ENDCOMPOSITION is received
    • Or when the composition string becomes empty

🧩 Components

File Purpose
ImeMessageInterceptor.cs Hooks IME messages and processes composition flow with Unicode support
ImeManager.cs Manages multiple interceptors
ImeCompositionEventArgs.cs Standardized event data
ImeUtilities.cs Utility for IME context and language info (no longer used for encoding detection)

📜 License

MIT License. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.2 163 4/24/2025
0.1.1 151 4/24/2025
0.1.0.2 154 4/24/2025
0.1.0.1 148 4/24/2025