OSDN Git Service

[Qt][OSD][KEYBOARD] Fix handling around SHIFT for some machines(i.e. PC8801).
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 27 Aug 2016 22:06:49 +0000 (07:06 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sat, 27 Aug 2016 22:06:49 +0000 (07:06 +0900)
source/src/qt/osd_input.cpp

index ac29ced..467cba1 100644 (file)
@@ -105,12 +105,14 @@ void OSD_BASE::update_input()
                        if(key_status[VK_SHIFT] == 0) {
                                // shift key is newly pressed
                                key_status[VK_SHIFT] = 0x80;
+                               if(!this->get_notify_key_down_lr_shift()) key_status[VK_LSHIFT] = 0x80;
                                if(this->get_notify_key_down()) vm_key_down(VK_SHIFT, false);
                        }
                } else if(!key_shift_pressed && key_shift_released) {
                        if(key_status[VK_SHIFT] != 0) {
                        // shift key is newly released
                                key_status[VK_SHIFT] = 0;
+                               if(!this->get_notify_key_down_lr_shift()) key_status[VK_LSHIFT] = 0;
                                if(this->get_notify_key_down()) vm_key_up(VK_SHIFT);
                                // check l/r shift
                                if(!(GetAsyncKeyState(VK_LSHIFT) & 0x8000)) key_status[VK_LSHIFT] &= 0x7f;