Browse Source

fix backspace repeat

David Rose 22 years ago
parent
commit
0f4b4c95b2
1 changed files with 9 additions and 1 deletions
  1. 9 1
      panda/src/windisplay/winGraphicsWindow.cxx

+ 9 - 1
panda/src/windisplay/winGraphicsWindow.cxx

@@ -952,7 +952,6 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
         // for handle_keystroke).
         // for handle_keystroke).
         if ((lparam & 0x40000000) == 0) {
         if ((lparam & 0x40000000) == 0) {
           POINT point;
           POINT point;
-          
           GetCursorPos(&point);
           GetCursorPos(&point);
           ScreenToClient(hwnd, &point);
           ScreenToClient(hwnd, &point);
           handle_keypress(lookup_key(wparam), point.x, point.y,
           handle_keypress(lookup_key(wparam), point.x, point.y,
@@ -982,6 +981,15 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
               CloseClipboard();
               CloseClipboard();
             }
             }
           }
           }
+
+        } else {
+          // Actually, for now we'll respect the repeat anyway, just
+          // so we support backspace properly.  Rethink later.
+          POINT point;
+          GetCursorPos(&point);
+          ScreenToClient(hwnd, &point);
+          handle_keypress(lookup_key(wparam), point.x, point.y,
+                          get_message_time());
         }
         }
         break;
         break;