summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2014-03-12 08:45:07 -0700
committerreduz <reduzio@gmail.com>2014-03-12 08:45:07 -0700
commit777c045bfc165e9dfe20749b02a8ad630218e317 (patch)
treed98d34820f2357ebfa3b1c2871bb86419bb9ba4d /platform
parentc7a03a064845201be871395f5475c436dc520ac6 (diff)
parent4927acd7ad718cb7b3f720bb48742928393160e3 (diff)
Merge pull request #189 from sanikoyes/hotfix-ime
Merging!
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/os_windows.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 090fe64b19..801bb9332a 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -608,6 +608,28 @@ void OS_Windows::process_key_events() {
switch(ke.uMsg) {
case WM_CHAR: {
+ if ((i==0 && ke.uMsg==WM_CHAR) || (i>0 && key_event_buffer[i-1].uMsg==WM_CHAR))
+ {
+ InputEvent event;
+ event.type=InputEvent::KEY;
+ event.ID=++last_id;
+ InputEventKey &k=event.key;
+
+
+ k.mod=ke.mod_state;
+ k.pressed=true;
+ k.scancode=KeyMappingWindows::get_keysym(ke.wParam);
+ k.unicode=ke.wParam;
+ if (k.unicode && gr_mem) {
+ k.mod.alt=false;
+ k.mod.control=false;
+ }
+
+ if (k.unicode<32)
+ k.unicode=0;
+
+ input->parse_input_event(event);
+ }
//do nothing
} break;