Skip to content

Instantly share code, notes, and snippets.

@chmnoh
Created October 13, 2016 14:32
Show Gist options
  • Save chmnoh/b34be2f0c44f8acefc2c1d8318820505 to your computer and use it in GitHub Desktop.
Save chmnoh/b34be2f0c44f8acefc2c1d8318820505 to your computer and use it in GitHub Desktop.
putty IME patch
diff -r cd645c82db8b -r 7384a4f0d802 windows/window.c
--- a/windows/window.c Thu Oct 23 16:17:24 2014 +0900
+++ b/windows/window.c Wed Sep 09 16:49:18 2015 +0900
@@ -3509,6 +3509,14 @@
* WARNING: Spans over multiple CASEs
*/
case WM_KEYDOWN:
+ if (wParam == VK_ESCAPE) {
+ HIMC hImc = ImmGetContext(hwnd);
+ if (ImmGetOpenStatus(hImc)) {
+ ImmSetConversionStatus(hImc, IME_CMODE_ALPHANUMERIC, IME_SMODE_NONE);
+ ImmReleaseContext(hwnd, hImc);
+ goto KEY_END;
+ }
+ }
if (wParam == VK_CONTROL && conf_get_int(term->conf, CONF_url_ctrl_click)) {
GetCursorPos(&cursor_pt);
ScreenToClient(hwnd, &cursor_pt);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment