VirtualBox

Changeset 98392 in vbox for trunk


Ignore:
Timestamp:
Feb 1, 2023 2:11:31 PM (2 years ago)
Author:
vboxsync
Message:

FE/SDL: bugref:9449. Revive passing ctrl+alt+Fx key combination to guest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r98372 r98392  
    29412941    * based on USB usage page standard. This is what we can directly pass to
    29422942    * 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);
    29442944}
    29452945
     
    39693969        case SDLK_F10: case SDLK_F11: case SDLK_F12:
    39703970        {
    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);
    39843978            return VINF_SUCCESS;
    39853979        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette