VirtualBox

Changeset 3767 in vbox for trunk/src


Ignore:
Timestamp:
Jul 22, 2007 10:54:01 PM (18 years ago)
Author:
vboxsync
Message:

Reduce occurrences of the message "Spurios NAK on isa0060/serio0" from Linux guests. Only send 0xFE if we really want to release any pressed modifier, not on every focus release. The real fix is to find a better way to prevent guests to interprete the KEYPRESS/KEYRELEASE event of a modifier key in that situation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r3762 r3767  
    26422642    AssertMsg (attached, ("Console must be attached"));
    26432643
    2644     LONG codes [2];
    26452644    CKeyboard keyboard = cconsole.GetKeyboard();
     2645    bool fSentRESEND = false;
    26462646
    26472647    // send a dummy scan code (RESEND) to prevent the guest OS from recognizing
     
    26502650    // Note, that it's just a guess that sending RESEND will give the desired
    26512651    // effect :), but at least it works with NT and W2k guests.
    2652     /** @todo This seems to causes linux guests (in console mode) to cough a bit.
    2653      * We need to check if this is the cause of #1944 and/or #1949. --bird */
    2654     codes [0] = 0xFE;
    2655     keyboard.PutScancodes (codes, 1);
    2656 
     2652
     2653    // @TODO Sending 0xFE is responsible for the warning
     2654    //
     2655    //         ``atkbd.c: Spurious NAK on isa0060/serio0. Some program might
     2656    //           be trying access hardware directly''
     2657    //
     2658    //       on Linux guests (#1944). It might also be responsible for #1949. Don't
     2659    //       send this command unless we really have to release any key modifier.
     2660    //                                                                    --frank
    26572661    for (uint i = 0; i < SIZEOF_ARRAY (keys_pressed); i++)
    26582662    {
    26592663        if (keys_pressed [i] & IsKeyPressed)
    26602664        {
     2665            if (!fSentRESEND)
     2666            {
     2667                keyboard.PutScancode (0xFE);
     2668                fSentRESEND = true;
     2669            }
    26612670            keyboard.PutScancode (i | 0x80);
    26622671        }
    26632672        else if (keys_pressed [i] & IsExtKeyPressed)
    26642673        {
     2674            if (!fSentRESEND)
     2675            {
     2676                keyboard.PutScancode (0xFE);
     2677                fSentRESEND = true;
     2678            }
     2679            LONG codes [2];
    26652680            codes[0] = 0xE0;
    26662681            codes[1] = i | 0x80;
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