2

Author Topic: F12 does not open tray  (Read 5262 times)

0 Members and 1 Guest are viewing this topic.

slashack

  • Member
  • Posts: 30
F12 does not open tray
« on: April 13, 2009, 10:03:23 AM »
With previous AppleACPIPlatform.kext and ApplePS2Controller.kext I used to keep F12 pressed to open dvd tray. Now I can't. The eject app in the menu bar showed that F12 ejected my drive, but now it shows the eject key, wich I don't have since it's a dell inspiron 1420 laptop.

Any solution? workaround? tweak? fix?

eMatoS

  • Entrant
  • Posts: 1
Re: F12 does not open tray
« Reply #1 on: April 17, 2009, 09:46:51 PM »
I'm having the same issue here, do you need any info from my computer to find this problem?

lebidou

  • Resident
  • Posts: 133
Re: F12 does not open tray
« Reply #2 on: April 21, 2009, 05:50:33 PM »
I may have a possible temporary fix for that.

I'm testing this at the moment so I do not guarantee it works well on long term. What I did :
Modify the ApplePS2Keyboard Info.plist file to replace com.apple.driver.ApplePS2Controller entry by org.voodoo.driver.PS2Controller
Remove VoodooPS2Keyboard.kext from VoodooPS2Controller.kext/Contents/PlugIns/
Copy the Modified ApplePS2Keyboard.kext in VoodooPS2Controller.kext/Contents/PlugIns/

Correct permissions and reboot.

On first try I did kextunload VoodooPS2Keyboard.kext; kextload ApplePS2Controller.kext instead of reboot and the "y" key was stuck.

Now I rebooted it works fine, with F12 Eject key.

trip2me

  • Observer
  • Posts: 21
deviceType() is a point.
« Reply #3 on: May 05, 2009, 06:52:45 AM »
With previous AppleACPIPlatform.kext and ApplePS2Controller.kext I used to keep F12 pressed to open dvd tray. Now I can't. The eject app in the menu bar showed that F12 ejected my drive, but now it shows the eject key, wich I don't have since it's a dell inspiron 1420 laptop.

Any solution? workaround? tweak? fix?

Actually the problem relates on keyboard type ID which is used in OS X.

in VoodooPS2Keyboard.cpp deviceType() says,
Code: [Select]
return APPLEPS2KEYBOARD_DEVICE_TYPE;
IOHIDSystem/IOHIKeyboardMapper.cpp decide to whether the F12 eject function enable or not.
At that time IOHIKeyboardMapper examines the deviceType() return value.

in IOHIKeyboardMapper.cpp
Code: [Select]
// If keys are defined, check the device type to determine 
// if we should support F12 eject.
if ((_delegate->interfaceID() == NX_EVS_DEVICE_INTERFACE_ADB) &&
    (((_delegate->deviceType() >= 0xc3) && (_delegate->deviceType() <= 0xc9)) ||
     ((_delegate->deviceType() >= 0x28) && (_delegate->deviceType() <= 0x2a)) ||
     ((_delegate->deviceType() >= 0x00) && (_delegate->deviceType() <= 0x1e)))) { 
    ...
    _supportsF12Eject = true;
    ...     
    if ( _supportsF12Eject ) {
        _delegate->setProperty( kIOHIDKeyboardSupportsF12EjectKey,
                            _supportsF12Eject);
    }
}

A list below is F12 eject key possible keyboards. Borrowed from Gestalt.h Each model number means device type.
Code: [Select]
gestaltMacKbd                 = 1,
gestaltMacAndPad              = 2,
gestaltMacPlusKbd             = 3,    /* OBSOLETE: This pre-ADB keyboard is not supported by any Mac OS X hardware and this value now means gestaltUnknownThirdPartyKbd */
gestaltUnknownThirdPartyKbd   = 3,    /* Unknown 3rd party keyboard. */
gestaltExtADBKbd              = 4,
gestaltStdADBKbd              = 5,
gestaltPrtblADBKbd            = 6,
gestaltPrtblISOKbd            = 7,
gestaltStdISOADBKbd           = 8,
gestaltExtISOADBKbd           = 9,
gestaltADBKbdII               = 10,
gestaltADBISOKbdII            = 11,
gestaltPwrBookADBKbd          = 12,
gestaltPwrBookISOADBKbd       = 13,
gestaltAppleAdjustKeypad      = 14,
gestaltAppleAdjustADBKbd      = 15,
gestaltAppleAdjustISOKbd      = 16,
gestaltJapanAdjustADBKbd      = 17,   /* Japan Adjustable Keyboard */
gestaltPwrBkExtISOKbd         = 20,   /* PowerBook Extended International Keyboard with function keys */
gestaltPwrBkExtJISKbd         = 21,   /* PowerBook Extended Japanese Keyboard with function keys      */
gestaltPwrBkExtADBKbd         = 24,   /* PowerBook Extended Domestic Keyboard with function keys      */
gestaltPS2Keyboard            = 27,   /* PS2 keyboard */
gestaltPwrBkSubDomKbd         = 28,   /* PowerBook Subnote Domestic Keyboard with function keys w/  inverted T  */
gestaltPwrBkSubISOKbd         = 29,   /* PowerBook Subnote International Keyboard with function keys w/  inverted T     */
gestaltPwrBkSubJISKbd         = 30,   /* PowerBook Subnote Japanese Keyboard with function keys w/ inverted T    */
gestaltThirdPartyANSIKbd      = 40,   /* Third party keyboard, ANSI layout.  Returned in Mac OS X Tiger and later. */
gestaltThirdPartyISOKbd       = 41,   /* Third party keyboard, ISO layout. Returned in Mac OS X Tiger and later. */
gestaltThirdPartyJISKbd       = 42,   /* Third party keyboard, JIS layout. Returned in Mac OS X Tiger and later. */
gestaltPwrBkEKDomKbd          = 195,  /* (0xC3) PowerBook Domestic Keyboard with Embedded Keypad, function keys & inverted T    */
gestaltPwrBkEKISOKbd          = 196,  /* (0xC4) PowerBook International Keyboard with Embedded Keypad, function keys & inverted T   */
gestaltPwrBkEKJISKbd          = 197,  /* (0xC5) PowerBook Japanese Keyboard with Embedded Keypad, function keys & inverted T      */
gestaltUSBCosmoANSIKbd        = 198,  /* (0xC6) original USB Domestic (ANSI) Keyboard */
gestaltUSBCosmoISOKbd         = 199,  /* (0xC7) original USB International (ISO) Keyboard */
gestaltUSBCosmoJISKbd         = 200,  /* (0xC8) original USB Japanese (JIS) Keyboard */
gestaltPwrBk99JISKbd          = 201,  /* (0xC9) '99 PowerBook JIS Keyboard with Embedded Keypad, function keys & inverted T               */

If you want these keyboards's layout, download Ukelele. It helps you.

P.S. I'm modifying VoodooPS2Keyboard now, to support change keyboard type ID easily by adding 'alt_handler_id' into Info.plist.
Sorry for my poor English.
Let's be a realist, however, keep impossible dream in our mind. -Che Guevara
All good that I do or have done is from Allah, and only the mistakes have been mine.  -Malcolm X

slashack

  • Member
  • Posts: 30
Re: F12 does not open tray
« Reply #4 on: May 06, 2009, 09:21:21 PM »
I've found that. I've already fixed it an binded more keys in my Inspiron 1420. The MediaDirect key and the play/pause/stop/forward/backward.