Changeset 3098 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 12, 2007 2:38:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r3094 r3098 682 682 return 1; 683 683 } 684 685 #ifdef __LINUX 686 /* 687 * Lock keys on SDL behave different from normal keys: A KeyPress event is generated 688 * if the lock mode gets active and a keyRelease event is genereated if the lock mode 689 * gets inactive, that is KeyPress and KeyRelease are sent when pressing the lock key 690 * to change the mode. The current lock mode is reflected in SDL_GetModState(). 691 * 692 * Debian patched libSDL to make the lock keys behave like normal keys generating a 693 * KeyPress/KeyRelease event if the lock key was pressed/released. But the lock status 694 * is not reflected in the mod status anymore. We disable the Debian-specific extension 695 * to ensure a defined environment and work around the missing KeyPress/KeyRelease 696 * events in ProcessKeys(). 697 */ 698 setenv("SDL_DISABLE_LOCK_KEYS", 1, 1); 699 #endif 684 700 685 701 /* … … 3132 3148 case 0x3a: /* Caps Lock */ 3133 3149 { 3134 /* SDL does not send the key up event, so we generate it. 3135 * r=frank: This is not true for never SDL versions. */ 3136 if (ev->type == SDL_KEYDOWN) 3150 /* 3151 * SDL generates a KEYDOWN event if the lock key is active and a KEYUP event 3152 * if the lock key is inactive. See SDL_DISABLE_LOCK_KEYS. 3153 */ 3154 if (ev->type == SDL_KEYDOWN || ev->type == SDL_KEYUP) 3137 3155 { 3138 3156 gKeyboard->PutScancode(keycode); … … 3161 3179 gKeyboard->PutScancode(0x45 | 0x80); 3162 3180 } 3163 #if 0 /* For some reason SDL_GetModState() does not return KMOD_CAPS correctly */3164 3181 if ( gcGuestCapsLockAdaptions 3165 3182 && (gfGuestCapsLockPressed ^ !!(SDL_GetModState() & KMOD_CAPS))) … … 3169 3186 gKeyboard->PutScancode(0x3a | 0x80); 3170 3187 } 3171 #endif3172 3188 } 3173 3189
Note:
See TracChangeset
for help on using the changeset viewer.