VirtualBox

Ignore:
Timestamp:
Jan 28, 2008 10:35:02 AM (17 years ago)
Author:
vboxsync
Message:

Mac OS X: Recognize the fn-key as an modifier key which exists on the various mac books.

File:
1 edited

Legend:

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

    r5999 r6523  
    7575#define QZ_RALT         0x3D
    7676#define QZ_RCTRL        0x3E
     77/* Found the definition of the fn-key in:
     78 * http://stuff.mit.edu/afs/sipb/project/darwin/src/modules/IOHIDFamily/IOHIDSystem/IOHIKeyboardMapper.cpp &
     79 * http://stuff.mit.edu/afs/sipb/project/darwin/src/modules/AppleADBKeyboard/AppleADBKeyboard.cpp
     80 * Maybe we need this in the future.*/
     81#define QZ_FN           0x3F
    7782#define QZ_NUMLOCK      0x47
    7883
     
    333338    /** @todo find symbols for these keycodes... */
    334339    fModifiers &= shiftKey | rightShiftKey | controlKey | rightControlKey | optionKey | rightOptionKey | cmdKey
    335                 | kEventKeyModifierRightCmdKeyMask | kEventKeyModifierNumLockMask | alphaLock;
     340                | kEventKeyModifierRightCmdKeyMask | kEventKeyModifierNumLockMask | alphaLock | kEventKeyModifierFnMask;
    336341    if (fModifiers == shiftKey)
    337342        uKeyCode = QZ_LSHIFT;
     
    354359    else if (fModifiers == kEventKeyModifierNumLockMask)
    355360        uKeyCode = QZ_NUMLOCK;
     361    else if (fModifiers == kEventKeyModifierFnMask)
     362        uKeyCode = QZ_FN;
    356363    else if (fModifiers == 0)
    357364        uKeyCode = 0;
     
    394401    else if (uKeyCode == QZ_NUMLOCK)
    395402        fModifiers = kEventKeyModifierNumLockMask;
     403    else if (uKeyCode == QZ_FN)
     404        fModifiers = kEventKeyModifierFnMask;
    396405    else
    397406        fModifiers = 0;
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