Can we write some condition for any key in keyboard.xml?

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
slinuxgeek Offline
Senior Member
Posts: 219
Joined: Feb 2012
Reputation: 0
Lightbulb  Can we write some condition for any key in keyboard.xml?
Post: #1
Can we write a condition for any key in keyboard.xml?
for ex:
PHP Code:
<keymap>
  <global>
    <
keyboard>
      <
F5 condition="a condition">ReloadSkin</F5>
    </
keyboard>
  </global>
</
keymap

Thanks for help in advance.
find quote
spiff Offline
Retired Developer
Posts: 12,384
Joined: Nov 2003
Post: #2
no. only context is window.
find quote
empezar Offline
Junior Member
Posts: 2
Joined: Jan 2015
Reputation: 0
Post: #3
This would make the key mapping a lot more powerful. Missing this feature.
find quote
Ned Scott Offline
Wiki Guy
Posts: 31,130
Joined: Jan 2011
Reputation: 538
Location: Arizona, USA
Post: #4
It is possible to map a key to run a python script in Kodi, and then have the script check for various conditions. It depends on what the final goal is.

Full disclosure: I work for WeTek. However, this is my personal account, and my words and opinion are my own.

HOW-TO: You can make easy links to the Kodi Wiki Manual using double brackets around common Kodi words: [[debug log]] = debug log (wiki), [[Video library]] = Video library (wiki), [[SMB]] = SMB (wiki) , etc
find quote