1. MINIX team will be having Chinese Lunar New Year holidays from 23/01 to 05/02, replies will be limited during this period, please kindly note.

Longpress key maps in kodi

Discussion in 'NEO A2 Lite' started by Velocity90, Jan 8, 2017.

  1. Velocity90

    Velocity90 Member

    Hi,

    Does the a2 lite support longpress key maps?

    Im trying to have the following key maps :

    Short press escape key = back + stop video

    Long press escape key = stock behavior (video keeps playing + file menu)

    Android key long press =dvd menu

    I can't get it to work.
  2. Velocity90

    Velocity90 Member

    Hi, <br /><br />Does the a2 lite support longpress key maps? <br /><br />Im trying to have the following key maps :<br /><br />Short press escape key = back + stop video<br /><br />Long press escape key = stock behavior (video keeps playing + file menu) <br /><br />Android key long press =dvd menu <br /><br />I can't get it to work. Did I made a mistake in the xml file?
  3. Higgs

    Higgs Yellow Dude Super Moderator

    I have merged your threads. Please don't double post. You can always bump your existing thread by adding another post to it if you feel it has been overlooked.

    In regards your question, I'm assuming you are referring to a keymap within Kodi. If so then it would help if you would state what version of kodi/xbmc you are using and if you also posted the xml code you are trying.
  4. Velocity90

    Velocity90 Member

    Hi,

    Yes a keymap within kodi.

    Tried with the latest minix xbmc, kodi 16.3, kodi 17 rc, and the latest spmc.

    This is in my keyboard.xml:

    <keymap>
    <global>
    <FullscreenVideo>
    <keyboard>
    <escape mod="longpress">stop</escape>
    </keyboard>
    </FullscreenVideo>
    <keyboard>
    <FullscreenVideo>
    <return mod="longpress">ShowVideoMenu</return>
    </keyboard>
    </FullscreenVideo>
    </global>
    </keymap>
  5. Higgs

    Higgs Yellow Dude Super Moderator

    At first glance I think your XML isn't right. You shouldn't have fullscreenvideo tags inside the global tags and there should only be one set of these.
    Also you seem to have an opening keyboard tag outside the second set of fullscreenvideo tags while the closing keyboard tag is inside. Tags need to be properly nested or the whole XML file is void.
    Sent from my MotoG3 using Tapatalk
  6. Velocity90

    Velocity90 Member

    Thank you for your help. What would be the proper code? I followed some guides but its all new to me.
  7. Higgs

    Higgs Yellow Dude Super Moderator

    I haven't tested this but assuming from your first post you want the following actions while watching a Video;
    Short press escape key = back + stop video
    Long press escape key = stock behavior (video keeps playing + file menu)
    Android key long press =dvd menu

    The code should be something like this (untested);
    Code:
    <keymap>
      <FullscreenVideo>
         <keyboard>
           <escape>Stop</escape>
           <escape mod="longpress">Back</escape>
           <return mod="longpress">ShowVideoMenu</return>
         </keyboard>
      </FullscreenVideo>
    </keymap>
    
    Velocity90 and Villa like this.
  8. Velocity90

    Velocity90 Member

    Hi,

    Thanks :) I tried it just now. The dvd menu works, but the longpress escape doesn't. I see theres no resume play after a stop (used to mede8er) so I guess I have to get used to the stock way but a easy way to stop the video is preferable so if it works I will switch the normal press escape with the longpress. Any ideas why the longpress escape doesn't work? If its possible to pauze+back to file menu so I could resume it would be perfect(EDIT: just solved this in kodi itself, now it askes if I want to resume).
    Last edited: Jan 13, 2017
  9. Velocity90

    Velocity90 Member

    Anyone any idea why the longpress doesn't work on the back key?