Skip to content

Instantly share code, notes, and snippets.

@verygoodlee
verygoodlee / ime.lua
Created May 13, 2024 03:38
mpv-disableIME
-- 取消mpv窗口与输入上下文的关联,达到禁用IME的效果
-- https://learn.microsoft.com/zh-cn/windows/win32/api/imm/nf-imm-immassociatecontext
local ffi_ok, ffi = pcall(require, 'ffi')
if not ffi_ok then return end
ffi.cdef[[
typedef void* HWND;
typedef void* HIMC;
typedef int BOOL;