Eject dvd tray with a key.

  • Base info: I have a case for my media center made from old deck (cassette player). There are some buttons on front I want to use, so, I've found a pc keyboard, dismantle it and connect its controller to the buttons. Controller has two sets of pins, each pair generates a keypress. I've checked all of them with key shortcut manager - there is also EJECT function - unfortunately it is not ejecting dvd-tray ,rather displaying favorites.

    So - the question is: how to eject the tray with pressing (any) key and/or how to map it to the key?

    I can use almost any other key, only few of them will be used at the case - but I prefer EJECT or some very exotic ones - there are some functions needed for automatic translation/transliteration from asian languages, which I do not need.

    Perfect situation is to find an addon (?) which can map "DVD-tray eject" to the key which I will press. Unfortunately I don't see Eject in Keyboard Mapping addon.

  • Kodi supports an EjectTray() function, see List of built-in functions - Official Kodi Wiki which is mapped for (infrared) remotes, but not for keyboards.

    The easiest solution is to manually create a .kodi/userdata/keymaps/keyboard.xml file with the appropriate config. eg something like this:to eject the tray when you press e

    Code
    <keymap>
      <global>
        <keyboard>
          <e>EjectTray()</e>
        </keyboard>
      </global>
    </keymap>

    Instead of <e>EjectTray()</e> you can also specify keycodes via eg <key id="123">EjectTray()</key> - see the kodi keymap wiki page for details Keymap - Official Kodi Wiki

    so long,

    Hias