Why isn’t KeyRemap4MacBook’s “PageUp/PageDown to Left/Right (only in iPhoto)” setting working

keybindingskeyboardremote control

I have "PageUp/PageDown to Left/Right (only in iPhoto)" checked in KeyRemap4MacBook (version 7.5.0):
enter image description here
And I've confirmed that my (non-Kensington) wireless USB gadget shows a PageDown and PageUp in KeyDump when I press the next slide and previous slide buttons:

eventType:keyDown   code:0x79   name:PageDown   flags:Fn    misc:characters:
eventType:keyUp code:0x79   name:PageDown   flags:Fn    misc:characters:
eventType:keyDown   code:0x74   name:PageUp flags:Fn    misc:characters:
eventType:keyUp code:0x74   name:PageUp flags:Fn    misc:characters:

But when I put iPhoto (version 9.2.1) in slideshow mode, the right and left arrow keys change the photo, but the buttons on my gadget don't work.

Any ideas why this isn't working? I thought perhaps KeyRemap4MacBook is remapping my MacBook Air's internal keyboard, but not the external USB keyboard that my gadget is pretending to be. But fn-Down-Arrow and fn-Up-Arrow (which show as PageDown and PageUp in KeyDump) also don't work in iPhoto.

(My MBA is running OS X 10.7.2.)

Best Answer

I posted my question on the KeyRemap4MacBook Google Group, and got a reply from Takayama Fumihiko, the creator of KeyRemap4MacBook. He had me send him the vendor ID and product ID for the device, and sent me back a private.xml file with a new setting that worked. (The pre-defined "PageUp/PageDown to Left/Right (only in iPhoto)" setting only works with the vendor ID and product ID for the Kensington K33374 USB remote.)

Here's the private.xml file contents:

<?xml version="1.0"?>
<root>

  <devicevendordef>
    <vendorname>Tenx_Technology_Inc</vendorname>
    <vendorid>0x1130</vendorid>
  </devicevendordef>

  <deviceproductdef>
    <productname>Tenx_wireless_USB_gadget</productname>
    <productid>0x6604</productid>
  </deviceproductdef>

  <item>
    <name>PageUp/PageDown to Left/Right (only in iPhoto)</name>
    <appendix>(This is effective only with "Tenx_wireless_USB_gadget")</appendix>
    <identifier>private.pageupdown2leftright_iphoto</identifier>
    <only>IPHOTO</only>
    <device_only>DeviceVendor::Tenx_Technology_Inc,DeviceProduct::Tenx_wireless_USB_gadget</device_only>
    <autogen>--KeyToKey-- FROMKEYCODE_PAGEUP,   KeyCode::CURSOR_LEFT</autogen>
    <autogen>--KeyToKey-- FROMKEYCODE_PAGEDOWN, KeyCode::CURSOR_RIGHT</autogen>
  </item>

</root>

See the "How to add new settings" section in the KeyRemap4MacBook documentation for instructions on what to do with the private.xml file (except replace the file instead of editing the original one with a text editor).