Kodi Community Forum
Creating a keymapping for to search the library. - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+---- Forum: Confluence (https://forum.kodi.tv/forumdisplay.php?fid=125)
+---- Thread: Creating a keymapping for to search the library. (/showthread.php?tid=76711)



[SOLVED] Creating a keymapping to search the library. - n3uromanc3r - 2010-07-06

I'm currently trying to work out how to map the search functionality to a key.

I presume some function must be called from keymap.xml

At present I understand I can activate the virtualkeyboard, but anything entered gets lost as it is not being passed to anything.

The confluence skin uses...

Code:
<control type="button" id="8">

<description>Search</description>

<include>ButtonMediaSubCommonValues</include>

<label>137</label>

</control>

To launch the virtualkeyboard and search when browsing the video library, I still don't quite get how it takes whatever is entered and parses it.

There must be a way to replicate the call that is made when clicking search (or hitting enter/return to search), and to assign this to a keystroke from within the keymap.xml

The key "e" is currently not in use, so I've been using that in my keymap.xml as follows

Code:
<e>ActivateWindow(virtualkeyboard)</e>

Does anyone know how to achieve this functionality, it would be great to have (I can see from searching that there are many who would like this).

I already know about the JumpSMS addition, which is great for those users who prefer a remote over a keyboard, but I want to to search using my keybaord, and don't want to have to navigate to the search button to do so.


- jmarshall - 2010-07-06

SendClick(id of search button)


- n3uromanc3r - 2010-07-06

jmarshall I honestly cannot thank you enough. I can't begin to tell you how long I've been looking through the wiki trying to piece this all together, I have surfed IRC and learnt quite a bit about how xbmc uses the various xml files. It is very object orientated, and looks like something I'd like to get more into.

Not once did I get told though that the id (in this case 8) could be called using the SendClick function, this is a great piece of information and if it is on the wiki I must have overlooked it.

So where should I look further to breakdown the code I posted. Does the label 8 refer to that snippet of code? Where can I find "ButtonMediaSubCommonValues" that is included, and lastly the label "137"... I was told it refered to the language files, but I couldn't find any number 137, nor could I find the Actual string used for the Search+VirtualKeyboard launch, where is this also?

Anyway, I guess I digress. The main point is, this is SOLVED!!!! Thanks for your help bro, it is very much appreciated.


For me the fix was to add the following line to my keymap.xml:

Code:
<e>SendClick(8)</e>

The number "8" came from:

Code:
<control type="button" id="[b][size=medium]8[/size][/b]">

If you happen to use a different skin, the id may differ, though by having a look at PM3.HD it is the same. You can find it in the corresponding "MyVideoNav.xml" file, which for me (on linux) is stored in:

/usr/share/xbmc/skin/Confluence/720p/

I hope someone somewhere finds this post useful, other than me.

Thanks again jmarshall, keep up the excellent work my friend.

Peace


- snyft - 2010-08-28

Since i use an imon knob that mostly send keyboard commands, im wondering if i have missed something? Because when i use <e>SendClick(8)</e> i only get an keyboard, it dosent jump to the search thingy... Any ideas?