This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 取消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; |