Jump to content
Flirc Forums

Is it possible to map a key to two or more functions for Kodi?


Birigoes

Recommended Posts

Hello.

 

First, I've installed Flirc in Windows 8.1 and I'm using Kodi 14.

 

So my Flirc unit arrived today, and after setting it up I noticed something, it's only possible to bind a key to a specific function, for instance, this is the remote I'm currently using (the remote of my Android box):

 

t4fV47.jpg

 

 

So as you can see from the picture above, the remote has one key which has three functions in my Android box: Play, Pause and OK (for instance, if I open the XBMC menu, that key will automatically be the OK key).

The problem is when using Flirc software for mapping keys on XBMC, I can only map that key to a specific function, let's say, pause (and it works as resume as well), but I really want that key to work as in my Android box, as Play, Pause, and OK key.

 

Is it possible to map it that way?

 

Best regards.

Edited by Birigoes
Link to comment
Share on other sites

I'm sorry but this is not possible. At least not with flirc alone. First of all you can't assign multiple keys to one remote button, but also the flirc itself doesn't know anything about the software you are running. It can only send key presses, it doesn't receive info what is currently going on.

There is a chance though. Xbmc/kodi is very flexible when it comes to customisation. You can try remapping keyboard controls using the keyboard.xml file so that you can use the same button for play, pause and OK.

Link to comment
Share on other sites

I'm sorry but this is not possible. At least not with flirc alone. First of all you can't assign multiple keys to one remote button, but also the flirc itself doesn't know anything about the software you are running. It can only send key presses, it doesn't receive info what is currently going on.

There is a chance though. Xbmc/kodi is very flexible when it comes to customisation. You can try remapping keyboard controls using the keyboard.xml file so that you can use the same button for play, pause and OK.

Hello yawor, first thank you for your fast reply Edited by Birigoes
Link to comment
Share on other sites

The best resource about XBMC/Kodi is their wiki based documentation: http://kodi.wiki/view/Keymap

 

You need to create a keyboard.xml file in proper directory (it depends on the system - the correct path can be found on the wiki page I've linked):

<keymap>
	<fullscreenvideo>
		<keyboard>
			<enter>PlayPause</enter>
			<return>PlayPause</return>
		</keyboard>
	</fullscreenvideo>
</keymap>

This configuration overrides enter key in FullScreenVideo mode to emit PlayPause action. It means that when you play a movie and nothing more is displayed (no menu, player controls etc, just a video playing) you can use enter/return key to play and pause the video. You can still open player controls (OSD) using M key while playing the video. Of course you need to assign your center button to the enter key.

 

If you already have a custom keyboard.xml then you need to edit it and add <enter> and <return> entries at correct location. If you don't know anything about XML files then post the file here I'll modify it for you.

Link to comment
Share on other sites

The best resource about XBMC/Kodi is their wiki based documentation: http://kodi.wiki/view/Keymap

 

You need to create a keyboard.xml file in proper directory (it depends on the system - the correct path can be found on the wiki page I've linked):

<keymap>
	<fullscreenvideo>
		<keyboard>
			<enter>PlayPause</enter>
			<return>PlayPause</return>
		</keyboard>
	</fullscreenvideo>
</keymap>

This configuration overrides enter key in FullScreenVideo mode to emit PlayPause action. It means that when you play a movie and nothing more is displayed (no menu, player controls etc, just a video playing) you can use enter/return key to play and pause the video. You can still open player controls (OSD) using M key while playing the video. Of course you need to assign your center button to the enter key.

 

If you already have a custom keyboard.xml then you need to edit it and add <enter> and <return> entries at correct location. If you don't know anything about XML files then post the file here I'll modify it for you.

 

Hello yawor.

 

I've just created the xml file, pasted what you posted and it works, it exactly what i wanted :D Now the center key works as an OK key while I'm navigation the menus, and as play/pause when I'm watching something.

 

The only thing left now is to open the menu while I'm watching, as the enter key was the one responsible for that function. In the Flirc software, there is no Open Menu key so I can bind. You said something about using the M key in order to do it, but how do I bind the Menu key in my remote to the M key, so I can open the menu when I press it? Do i need to edit the XML file further?

 

Best regards and thanks for your time :)

 

EDIT

 

Forget it, I can choose the Full Keyboard option from the Controllers menu and then bind a key to the M key.

 

Everything works as I wanted, thank you very much for your support, this product is so well thought  :D

 

By the way yawor, the Flirc forum is suffering from the IPB redirect exploit --> http://blog.sucuri.net/2015/02/analyzing-malicious-redirects-in-the-ip-board-cms.html?

 

Every time I do a Google search and click the Flirc search result it redirects me for that filestore321.

 

Regards.

Edited by Birigoes
  • Like 1
Link to comment
Share on other sites

Yes, this is the way you do it. When there olis no key you want on the other controllers you just need to use keyboard one.

Thank you for the heads up about the exploit. I've not used google to search this forum for a long time and it somehow went unnoticed who knows for how long.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...