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,
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
// 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.
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.