From a6938c11b0a3c316dc138fcb7f15e6a92ce01cbe Mon Sep 17 00:00:00 2001 From: mntone Date: Sat, 27 May 2017 17:24:24 +0900 Subject: [PATCH] UI, libobs: Add Japanese shortcut keys for Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Japanese shortcut keys, non-convert (無変換) and convert (変換) and disable IME for OBSHotkeyEdit. Closes jp9000/obs-studio#930 --- UI/hotkey-edit.hpp | 1 + libobs/obs-windows.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/UI/hotkey-edit.hpp b/UI/hotkey-edit.hpp index 985d44b2e..3299e2803 100644 --- a/UI/hotkey-edit.hpp +++ b/UI/hotkey-edit.hpp @@ -53,6 +53,7 @@ public: // enough with the default focus frame setReadOnly(true); #endif + setAttribute(Qt::WA_InputMethodEnabled, false); setAttribute(Qt::WA_MacShowFocusRect, true); InitSignalHandler(); ResetKey(); diff --git a/libobs/obs-windows.c b/libobs/obs-windows.c index b8a139ec2..5433889e1 100644 --- a/libobs/obs-windows.c +++ b/libobs/obs-windows.c @@ -328,6 +328,8 @@ static int get_virtual_key(obs_key_t key) case OBS_KEY_BRACKETRIGHT: return VK_OEM_6; case OBS_KEY_ASCIITILDE: return VK_OEM_3; + case OBS_KEY_HENKAN: return VK_CONVERT; + case OBS_KEY_MUHENKAN: return VK_NONCONVERT; case OBS_KEY_KANJI: return VK_KANJI; case OBS_KEY_TOUROKU: return VK_OEM_FJ_TOUROKU; case OBS_KEY_MASSYO: return VK_OEM_FJ_MASSHOU;