From: giwoong.kim Date: Thu, 29 Mar 2012 01:28:35 +0000 (+0900) Subject: [Title] retrieves the status of host NumLock & CapsLock key in windows X-Git-Tag: TizenStudio_2.0_p2.3~1587 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f806ef98b9840a561b7e3f8fc4f7b8c7079b909;p=sdk%2Femulator%2Fqemu.git [Title] retrieves the status of host NumLock & CapsLock key in windows [Type] [Module] Emulator [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index 326ffcd..f05846b 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -131,7 +131,7 @@ MultiTouchState *get_emul_multi_touch_state(void) return &(_emul_state.qemu_mts); } -/* get host key state */ +/* retrieves the status of the host lock key */ int get_host_lock_key_state(int key) { #if defined( __linux__) @@ -151,7 +151,15 @@ int get_host_lock_key_state(int key) return -1; #elif defined(_WIN32) - //TODO: + int nVirtKey = 0; + + if (key == HOST_CAPSLOCK_KEY) { + nVirtKey = VK_CAPITAL; + } else if (key == HOST_NUMLOCK_KEY) { + nVirtKey = VK_NUMLOCK; + } + + return (GetKeyState(nVirtKey) & 1) != 0; #endif return 0;