Configuring a remote - exasperated (1 Viewer)

deepskydiver

MP Donator
  • Premium Supporter
  • January 2, 2012
    59
    4
    Brisbane
    Home Country
    Australia Australia
    It's been a while since I had to do this and on a new PC now I'm utterly lost with the change to HID. It may well be better and certainly previously every time I had to do this I spent a while trying to work it out.

    I can take it the rest of the way if someone can help by telling me how (for example) I would bind CTRL-ALT-1 to recorded TV or CTRL-R to Record please. Is there a config file I can edit directly?

    On this page:

    http://wiki.team-mediaportal.com/1_...ion/00_Configuration/8_Remote/Mapping_Buttons

    .. .. nothing I do puts a key in the key field, and on this page:

    http://wiki.team-mediaportal.com/1_...l_Configuration/11_General/12_Keys_and_Sounds

    .. nothing I do seems to let me use CTRL or ALT
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,873
    1,801
    Southampton
    Home Country
    United Kingdom United Kingdom
    nothing I do seems to let me use CTRL or ALT
    I am not sure that MP supports this (but then, what do I know?).

    You could use a tool such as AutoHotKey, which can map any keystroke to any other keystroke (but I found it difficult to learn, and I still haven't learnt it).

    What remote control and IR receiver are you trying to use? It might help if you specified the manufacturer and model number of both the remote and the IR receiver.

    -- from CyberSimian in the UK
     

    deepskydiver

    MP Donator
  • Premium Supporter
  • January 2, 2012
    59
    4
    Brisbane
    Home Country
    Australia Australia
    That's a great idea! I'm using a logitech remote but want to use the same settings for Kodi and MP. I do use autohotkey to get around the bindings in MGS Phantom Pain on PC, but hadn't thought of it in this application. And really I guess I'm just frustrated because simple mapping doesn't seem to be possible. So I'll just use the MCE remote config choice (which might apparently soon not be supported) and wait until the HID transition breaks everything and I'm forced to start again.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    So I'll just use the MCE remote config choice (which might apparently soon not be supported) and wait until the HID transition breaks everything and I'm forced to start again.
    The MCE remote handler is being removed in 1.13 PR. Internally we are already testing in preparation for release. With that in mind, it seems silly to configure for the MCE handler. Having said that, with the exception of customised mappings the transition is meant to be seamless. After all MCE remotes are just a single specific HID implementation.

    What is it that you fear will be broken, and why don't you go with HID now?
     

    deepskydiver

    MP Donator
  • Premium Supporter
  • January 2, 2012
    59
    4
    Brisbane
    Home Country
    Australia Australia
    I couldn't get it working using the HID option. So ignorance of what to do and the philosophy underlying it I guess. I don't know where to start and couldn't find anything that worked. None of the wikis gave me an idea of how to approach it or whether what I had in my head would work with or against the design.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Well, I don't know/understand what's in your head, so it's difficult to know how to assist. :)

    Are you trying to create a common set of keyboard shortcuts that you can use to control MP and KODI with either your remote or keyboard?
    If you are only using a remote, why do you care about CTRL and ALT?
     

    deepskydiver

    MP Donator
  • Premium Supporter
  • January 2, 2012
    59
    4
    Brisbane
    Home Country
    Australia Australia
    My approach was to configure using the raw keys (so the red button is CTRL-ALT-1 for example). I thought if I simply mapped everything literally I'd have control over the bindings.

    But in MP 1.x I don't think you can use CTRL or ALT? And if you do - where do you bind it to the actions and windows if I use HID?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    My approach was to configure using the raw keys (so the red button is CTRL-ALT-1 for example).
    Raw keys? Proper MCE-compatible remotes/receivers don't generate key presses, so I can only guess that you're referring to the keyboard shortcut associated with the red button in a specific application (eg. WMC).

    I thought if I simply mapped everything literally I'd have control over the bindings.
    I could be wrong, but I think you've misunderstood.

    CTRL-ALT-1 is an application-specific binding. Attempting to configure each application to recognise a specific keyboard shortcut for each button [and translate that into the action associated with the button - eg. the play button generates CTRL-P, which triggers the play action] is the hard way to do things (if it is even possible).

    To continue my example, MediaPortal recognises when you press the play button. The mapping configuration is what tells MP what that button means. So for example, the default mapping for the play button is the play action. The fact that MP's keyboard shortcut for play is P is incidental and should be irrelevant when it comes to remote configuration.

    Another way of thinking about the way MP does things is to realise that you can change the action (meaning) of a button independently of its keyboard shortcut. For example, you could use mapping to make the play button take a screenshot... and this wouldn't change the fact that the keyboard shortcut for the play action would still be P. Similarly you can do the reverse - you can change the keyboard shortcut to SPACE without affecting the function of the remote button.

    Am I making sense?

    But in MP 1.x I don't think you can use CTRL or ALT?
    Yes, I think you're right.

    And if you do - where do you bind it to the actions and windows if I use HID?
    As above: when you enable the HID handler, it should directly recognise the buttons you're pressing (in technical terms they're called "usages"). The function of the buttons is determined by the mapping you configure. For most people the default mapping is fine for most buttons. The keyboard shortcuts are a separate concern. You shouldn't need to touch them unless you don't like them... and changing them won't affect how your remote functions (unless the remote generates keyboard shortcuts, which is a bad thing!).
     

    deepskydiver

    MP Donator
  • Premium Supporter
  • January 2, 2012
    59
    4
    Brisbane
    Home Country
    Australia Australia
    Oh - CTRL-ALT-1 is what the RED button comes through as (when you run an app to show the key pressed). It's what I have them bound to in Kodi (for example). The Guide button is CTRL-G I think, and the record button CTRL-R. It also makes using the keyboard or the remote easy when I know the kb equivalents.

    I've had another look at the HID mappings and I can see what you're saying. I think on the first look it didn't look like they were all there.

    What I'd had in my head was being able to specify a key combination and map it to any action/window etc.
    I've also found the logitech app temperamental lately (does nothing / won't sync across many PCs) so I was looking to do it all in MP. Is there an xml file or other config that results which you can hand edit?

    Anyway - to paraphrase and make sure I've got it:

    Mediaportal uses a fixed set of keys buttons. If the key isn't there you can't bind it. A remote must use this subset - which are shown in the HID mapping.
    Then, in the HID mapping you find that key. Map the command you want and set it to be global or within a specific scope of the Mediaportal.

    This is what I'll look at in a few years when I have to do it again :)

    Thanks!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Oh - CTRL-ALT-1 is what the RED button comes through as (when you run an app to show the key pressed). It's what I have them bound to in Kodi (for example). The Guide button is CTRL-G I think, and the record button CTRL-R. It also makes using the keyboard or the remote easy when I know the kb equivalents.
    Yeah, I understand. :)
    Like I said in my previous post: you can edit the keyboard shortcuts that MP uses to be whatever you want them to be. That's what this configuration is:
    http://wiki.team-mediaportal.com/1_...l_Configuration/11_General/12_Keys_and_Sounds

    ...and that's completely independent of the remote mapping configuration. Unfortunately I don't think CTRL or ALT are supported.

    @Stéphane Lenclud
    Are you able to confirm?

    I've had another look at the HID mappings and I can see what you're saying. I think on the first look it didn't look like they were all there.
    Right. Most if not all MCE remote mappings should be present within the HID handler mappings. If they're not I think it's possible to add them by editing the Generic-HID.xml config file.

    I've also found the logitech app temperamental lately (does nothing / won't sync across many PCs) so I was looking to do it all in MP.
    Pass. I'm not able to comment about or help with this.

    Is there an xml file or other config that results which you can hand edit?
    To edit keyboard shortcuts?
    That would be c:\ProgramData\Team MediaPortal\MediaPortal\keymap.xml. XML files can be opened and edited in any text editor.
    For the record I'd probably advise to avoid hand editing and stick with the GUI. However one of the great things about MP is that you can do whatever you want. If you do edit the file, it's probably a good idea to take regular backups.

    Anyway - to paraphrase and make sure I've got it:

    Mediaportal uses a fixed set of keys buttons. If the key isn't there you can't bind it. A remote must use this subset - which are shown in the HID mapping.
    Then, in the HID mapping you find that key. Map the command you want and set it to be global or within a specific scope of the Mediaportal.
    I think you're on the right track now, but the first part is still not quite right.

    The default MediaPortal configuration includes definitions for a certain set of buttons. That set is intended to cover a bunch of common types of input devices including MCE-compliant remotes. As mentioned above, I'm fairly sure the set is not fixed and so support can be added for additional input devices and remotes without restriction.

    Adding a button definition is done by hand editing Generic-HID.xml. You shouldn't need to know or care about that if using a MCE-compliant remote, because all the standard MCE buttons should already be defined. Best to ask somebody like @Stéphane Lenclud if you want to understand the detail for your own satisfaction.

    Again, hope that helps. :)
     

    Users who are viewing this thread

    Top Bottom