Allow keymap definitions in the screen XML files

Issue #206 open
IanSav created an issue

I have a wish and proposal for a change to the Enigma2 skinning system.

This wish may not be easy and may have implications which I have not yet considered. What I propose is to shift some of the content in the "keymap.xml" file into the screen definitions in the main "skin.xml" file (or sub files, as appropriate). That is where a screen desires some special buttons or wishes to redefine some standard buttons then it should be possible to add appropriate " <key id="KEY_NEXT" mapto="deleteForward" flags="mr" />" type entries into the screen definition XML. This facility is used in the Python code behind the screen XML elements but does not appear to be exposed in the skinning XML files themselves.

If should be noted that the current system of initial key definitions being hard coded in Enigma2, then key redefinitions being permitted in the "keymap.xml" file should remain. These extra definitions / redefinitions come into play when the screen element in question becomes active on the screen. I can envision that most of the definitions in the keymap.xml file could be moved into the appropriate screen definitions. This would simplify the keymap.xml file to managing global level redefinitions.

The advantage of this extension is that custom key definitions can be changed in the skin file without the need to change the library Python code associated with the screen. This would also keep the key changes together with the screen definitions to which they apply. The current system of creating a section in the "keymap.xml", and/or the Python code behind the screen element disassociates the changed keys from their context. This detachment creates an opportunity for button confusion and or mistakes. Further having the key definitions with the screen elements creates a kind of self documentation.

It should go without saying that the key definitions can be shared in the same way the screens can use panels of other screens. If one screen creates a panel from another screen then the keys defined in that other screen are also used in this screen.

I should note that this proposal is suggested for feeding into all upstream versions of Enigma2 not just the Australian effort. If the additional XML block or tags are not defined / used then there should be NO change to the operation of any other build.

Obviously I can imagine that others may well use the new facilities if they become available.

Comments (2)

  1. Ian Brabham
    • removed issue_status

    The issue was updated with the following change(s):

    • The status has been updated, from New to Confirmed.
  2. Peter Urbanec
    • removed issue_category

    The issue was updated with the following change(s):

    • The category has been updated, from Not determined to Application / User Interface.
  3. Log in to comment