Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Logitech Harmony Remote with Shield TV Kodi
#1
So I'm wondering, is there a way to map the function of a keyboard 'Tab' and 'Ctrl+N' press to a Harmony remote?

I already have the remote set up with the Shield, so the core buttons work. But I want to add those 2 functions.

I've been thinking of ways to do this: one, by adding some sort of Shield TV compatible keyboard device to the remote and adding it to the Shield TV activity.

The other by editing the keymap so that some uneeded buttons, i.e. rewind and pause, are mapped to the functions that keyboard Tab and Ctrl+N do.

Thoughts, and thanks in advance.
Reply
#2
As far as i gathered, unless your Harmony remote is one of those bluetooth ones, then no. I have a harmony 650 and i cant seem to get any extra buttons mapped

*EDIT* heard something about flirc i think......thats the only way to get the other ones mapped

Cheers!
Reply
#3
Have you tried editing your keymap and seen what happens? For instance, editing what the pause button does?
Reply
#4
We just had a whole conversion about Harmony setups in the Shield thread: http://forum.kodi.tv/showthread.php?tid=...pid2349324

But if your remote is IR only, then no, you can't program any extra functions. You'll need a Flirc if you want more control or you'll need to update to a Harmony Hub.
Forum Rules (wiki) | Banned add-ons (wiki) | Wiki (wiki) | Quick start guide (wiki)
Reply
#5
(2016-06-10, 20:02)Vefom Wrote: Have you tried editing your keymap and seen what happens? For instance, editing what the pause button does?

Good idea to mention what Harmony you actually have.
You can use the Kodi keymap editor, and achieve some things, you can also use Multilanguage Keymap Redefiner to make it system wide instead of just Kodi/SPMC. But ultimately, if you only have an IR Harmony, it will come at a cost of other commands. The inherent problem is that not all commands are actually received/processed by the Shield. This is why for IR versions a Flirc is best, and I had used an IR to USB receiver before I got my Flircs to get more control.
Reply
#6
For Harmony IR remotes these are the commands recognized by Kodi. You can remap some of them (such as Rewind and Fast forward) using Keymap Editor, loosing its function:

Key# Key
61448 Back
61453 Select
61568 Up
61569 Down
61570 Left
61571 Right
61628 Stop
61629 Play/Pause
61636 Rewind
61637 Fastforward


Note that Play and Pause are different keys, and work differently in Android, but are recognized with the same key number in Kodi (log file shows different scan codes, but these aren't usable).

These other IR keys are passed directly to Android and are not usable by Kodi:

Home
Vol Down
Vol Up
Mute
Power Off
Power On
Pwr Toggle


Note that Shield Remote (bluetooth) allows using long press version of keys, so although only having 6 keys one can have 12 commands (more than the 10 IR keys recognize by Kodi):

Key# Key
61448 Back
61453 Select
61568 Up
61569 Down
61570 Left
61571 Right


To achieve this, keymap xml file needs to be edited manually, specifying mod="longpress" in key commands.
Reply
#7
(2016-06-10, 18:00)Vefom Wrote: So I'm wondering, is there a way to map the function of a keyboard 'Tab' and 'Ctrl+N' press to a Harmony remote?

in contrast to what is mentioned above, you CAN assign extra functions. However, you'll need root access to modify key layouts. For example, the Power Off and Power On mapped by the Harmony software are rather obsolete (Power Toggle is enough) and can be assigned to do something else. Below an example, where you'll see the new and original mapping(#):

Code:
#
# Generic key layout file for full alphabetic US English PC style external keyboards.
#
# This file is intentionally very generic and is intended to support a broad rang of keyboards.
# Do not edit the generic key layout to support a specific keyboard; instead, create
# a new key layout file with the required keyboard configuration.
#

key 2     1
key 3     2
key 4     3
key 5     4
key 6     5
key 7     6
key 8     7
key 9     8
key 10    9
key 11    0

key 113   MENU              # MUTE
key 114   MINUS             # VOLUME_DOWN
key 115   EQUALS            # VOLUME_UP
key 116   POWER             # POWER_TOGGLE

key 103   DPAD_UP
key 105   DPAD_LEFT
key 106   DPAD_RIGHT
key 108   DPAD_DOWN
key 128   MEDIA_STOP
key 142   TAB               # Power_OFF
key 143   I                 # Power_ON
key 158   BACK
key 168   PAGE_DOWN         # MEDIA_REWIND
key 172   HOME              # = EXIT
key 200   MEDIA_PLAY
key 201   MEDIA_PAUSE
key 208   PAGE_UP           # MEDIA_FAST_FORWARD
key 217   SEARCH
key 353   DPAD_CENTER       # = Ok

This way you can use commands not recognized by Kodi:
Home
Vol Down
Vol Up
Mute
Power Off
Power On
Pwr Toggle

But as Hiphopopotamus mentioned, the Flirc is more versatile and sends commands faster than the rather slow Harmony IR. But if you don't want to sacrifice an USB port or don't want to spend extra money, you can achieve roughly the same with a little effort.
Reply
#8
Shield TV (build in IR)-Harmony(650) MOD. Menu and info Button + more.

WHAT TO DO:

Setup your harmony (650) as a Shield TV remote.
Change 3 buttons:
-exit - Home
-Menu - Rewind
-Info - Forward

Save the harmony.xml file into your userdata folder keymaps.

Not needed: but... longpress ok button in visualisation(OSD) will open ProjectM and back close.
Note.. Game controller or custom airmouse needed to set options in ProjectM.
tip.. show mouse cursor and double click to open options.

Google the Project M Visualiser .apk on internet (Playstore won't let you istall it on Shield TV).

INFO:

I Changed the Rewind and Forward buttons for Menu and Info and changed/added longpress button functions.
Yes you will lose the rewind and forward buttons! But wil have direct acces to Menu and Info!
Remind:
- you can use the onscreen buttons (Menu)
- direction buttons have skipfunctions.(video)
- direction buttons have searchfunctions.(Music)

Added longress buttons gives also the options like fullscreen/title/screenshot/etc.

These are the buttons that the Shield TV supports and what the fuctions are in kodi.

Harmony Kodi functions/keymapping

Exit = Home(ShieldTV) key id=*****
Menu = Menu longpress = Fullscreen key id=61636
Info = Info longpress = Title key id=61637
Vol+ = Vol+ (ShieldTV) key id=*****
Vol- = Vol- (ShieldTV) key id=*****
Mute = Mute (ShieldTV) key id=*****
Up = Up longpress = (skipnext/rating+*) key id=61568
Down = Down longpress = (skipprev/rating-*) key id=61569
Left = Left longpress = (showsubtitle*) key id=61570
Right = Right longpress = (nextsubtitle*) key id=61571
Select = Select longpress = Favorites /(Start projectM visualiser*) key id=61453
Back = Back longpress = (Home(Kodi)/stop/shutdown(kodi)*) key id=61448
Chan+ = (same as) Up key id=61568
Chan- = (same as) Down key id=61569
Rewind = (same as) Menu key id=61636
Forward = (same as) Info key id=61637
Play = Play/Pause key id=*****
Pause = Play/Pause key id=*****
Stop = Stop longpress = Screenshot key id=61628

*See harmony.xml and keyboard.xml for more info and all functions !!!

Copy text and save as harmony.xml
PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <global>
    <keyboard>
      <key id="61636">ContextMenu</key>
      <key id="61637">Info</key>
      <key id="61628" mod="longpress">Screenshot</key>
      <key id="61636" mod="longpress">FullScreen</key>
      <key id="61453" mod="longpress">ActivateWindow(Favourites)</key>
    </keyboard>
  </global>
  <Home>
    <keyboard>
      <key id="61637">ActivateWindow(SystemInfo)</key>
      <key id="61448" mod="longpress">ShutDown()</key>
    </keyboard>
  </Home>
  <FullscreenVideo>
    <keyboard>
      <key id="61636">OSD</key>
      <key id="61637">Info</key>
      <key id="61637" mod="longpress">CodecInfo</key>
      <key id="61568" mod="longpress">SkipNext</key>
      <key id="61569" mod="longpress">SkipPrevious</key>
      <key id="61570" mod="longpress">ShowSubtitles</key>
      <key id="61571" mod="longpress">NextSubtitle</key>
    </keyboard>
  </FullscreenVideo>
  <FullscreenInfo>
    <keyboard>
      <key id="61637">Back</key>
      <key id="61636">OSD</key>
      <key id="61637" mod="longpress">CodecInfo</key>
    </keyboard>
  </FullscreenInfo>
  <PlayerControls>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </PlayerControls>
  <Visualisation>
    <keyboard>
      <key id="61636">OSD</key>
      <key id="61637">Info</key>
      <key id="61636" mod="longpress">FullScreen</key>
      <key id="61637" mod="longpress">CodecInfo</key>
      <key id="61453" mod="longpress">StartAndroidActivity(&quot;com.psperl.prjM&quot;)</key>
      <key id="61568" mod="longpress">IncreaseRating</key>
      <key id="61569" mod="longpress">DecreaseRating</key>
    </keyboard>
  </Visualisation>
  <MusicOSD>
    <keyboard>
      <key id="61636">Back</key>
      <key id="61637">CodecInfo</key>
      <key id="61637" mod="longpress">Info</key>
      <key id="61453" mod="longpress">StartAndroidActivity(&quot;com.psperl.prjM&quot;)</key>
    </keyboard>
  </MusicOSD>
  <VisualisationSettings>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </VisualisationSettings>
  <VisualisationPresetList>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </VisualisationPresetList>
  <SlideShow>
    <keyboard>
      <key id="61637">CodecInfo</key>
      <key id="61637" mod="longpress">Info</key>
    </keyboard>
  </SlideShow>
  <VideoOSD>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </VideoOSD>
  <VideoMenu>
    <keyboard>
      <key id="61636">OSD</key>
      <key id="61637">Info</key>
      <key id="61637" mod="longpress">CodecInfo</key>
      <key id="61568" mod="longpress">SkipNext</key>
      <key id="61569" mod="longpress">SkipPrevious</key>
      <key id="61570" mod="longpress">ShowSubtitles</key>
      <key id="61571" mod="longpress">NextSubtitle</key>
    </keyboard>
  </VideoMenu>
  <OSDVideoSettings>
    <keyboard>
      <key id="61636">Back</key>
      <key id="61637">Info</key>
      <key id="61637" mod="longpress">CodecInfo</key>
    </keyboard>
  </OSDVideoSettings>
  <OSDAudioSettings>
    <keyboard>
      <key id="61636">Back</key>
      <key id="61637">Info</key>
      <key id="61637" mod="longpress">CodecInfo</key>
    </keyboard>
  </OSDAudioSettings>
  <VideoBookmarks>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </VideoBookmarks>
  <ContextMenu>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </ContextMenu>
  <Scripts>
    <keyboard>
      <key id="61637">info</key>
    </keyboard>
  </Scripts>
  <MusicInformation>
    <keyboard>
      <key id="61637">Back</key>
    </keyboard>
  </MusicInformation>
  <MovieInformation>
    <keyboard>
      <key id="61637">Back</key>
    </keyboard>
  </MovieInformation>
  <LockSettings>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </LockSettings>
  <ProfileSettings>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </ProfileSettings>
  <PictureInfo>
    <keyboard>
      <key id="61637">Back</key>
    </keyboard>
  </PictureInfo>
  <Teletext>
    <keyboard>
      <key id="61636">Back</key>
    </keyboard>
  </Teletext>
  <FullscreenLiveTV>
    <keyboard>
      <key id="61568" mod="longpress">SkipNext</key>
      <key id="61569" mod="longpress">SkipPrevious</key>
    </keyboard>
  </FullscreenLiveTV>
  <FullscreenRadio>
    <keyboard>
      <key id="61568" mod="longpress">SkipNext</key>
      <key id="61569" mod="longpress">SkipPrevious</key>
    </keyboard>
  </FullscreenRadio>
  <PVROSDChannels>
    <keyboard>
      <key id="61636">Close</key>
    </keyboard>
  </PVROSDChannels>
  <PVROSDGuide>
    <keyboard>
      <key id="61636">Close</key>
    </keyboard>
  </PVROSDGuide>
</keymap> 
Reply
#9
That's a lot of information there, thanks a lot.

I will definitely look into remapping the Shield remote controls (I did a similar thing with the Fire Tv remote). I will have a long press of back as the tab function, and Select long press as ctrl+n (player controls) - in global mode, plus some other things when the video osd is on screen (video info, stop).

I will be using a 650 (coming soon), but I have tested with an old 360 and a recent 350. What I'd like to know is, in the keymap, can I change what functions like Pause do when pressed in a global or video OSD state? Without rooting, or anything like that?
Reply
#10
Only the Buttons with key id's you van change the functions in the keymap.
Try and see the mod. I posted above, should work for other harmony models.
Reply
#11
Ah, I didn't use your code, but did just use one of my old firetv keymaps, and it does do the things I wanted.

So I can bring up the ctrl+n player controls now when pressing the pause button.

I'll do some further tinkering when my 650 arrives and post my config here for anyone interested.

I'm using a worn out, unresponsive harmony 360 (the xbox branded one) at the moment, so kinda sucks to test with. I did have a 350 for a while and thankfully returned it to get the 650.
Reply

Logout Mark Read Team Forum Stats Members Help
Logitech Harmony Remote with Shield TV Kodi0