Changeset 98392 in vbox
- Timestamp:
- Feb 1, 2023 2:11:31 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r98372 r98392 2941 2941 * based on USB usage page standard. This is what we can directly pass to 2942 2942 * IKeyboard::putUsageCode. */ 2943 gpKeyboard->PutUsageCode(SDL_GetScancodeFromKey(ev->keysym.sym), 0x07 , ev->type == SDL_KEYUP ? TRUE : FALSE);2943 gpKeyboard->PutUsageCode(SDL_GetScancodeFromKey(ev->keysym.sym), 0x07 /*usage code page id*/, ev->type == SDL_KEYUP ? TRUE : FALSE); 2944 2944 } 2945 2945 … … 3969 3969 case SDLK_F10: case SDLK_F11: case SDLK_F12: 3970 3970 { 3971 // /* send Ctrl-Alt-Fx to guest */ 3972 #if 0 // Fix me. I was not working with PutScancodes API. Need to find the corect way to do this with PutUsagecode API 3973 com::SafeArray<LONG> keys(6); 3974 3975 keys[0] = 0x1d; // Ctrl down 3976 keys[1] = 0x38; // Alt down 3977 keys[2] = Keyevent2Keycode(pEv); // Fx down 3978 keys[3] = keys[2] + 0x80; // Fx up 3979 keys[4] = 0xb8; // Alt up 3980 keys[5] = 0x9d; // Ctrl up 3981 3982 gpKeyboard->PutScancodes(ComSafeArrayAsInParam(keys), NULL); 3983 #endif 3971 /* send Ctrl-Alt-Fx to guest */ 3972 gpKeyboard->PutUsageCode(0xE0 /*left ctrl*/, 0x07 /*usage code page id*/, FALSE); 3973 gpKeyboard->PutUsageCode(0xE2 /*left alt*/, 0x07 /*usage code page id*/, FALSE); 3974 gpKeyboard->PutUsageCode(pEv->keysym.sym, 0x07 /*usage code page id*/, FALSE); 3975 gpKeyboard->PutUsageCode(pEv->keysym.sym, 0x07 /*usage code page id*/, TRUE); 3976 gpKeyboard->PutUsageCode(0xE0 /*left ctrl*/, 0x07 /*usage code page id*/, TRUE); 3977 gpKeyboard->PutUsageCode(0xE2 /*left alt*/, 0x07 /*usage code page id*/, TRUE); 3984 3978 return VINF_SUCCESS; 3985 3979 }
Note:
See TracChangeset
for help on using the changeset viewer.