Kodi Community Forum

Full Version: Is there a letter equiv. of jumpsms ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm looking to implement jumping to a particular file in a skin view based on a user supplied letter (kind of jumpletter instead of jumpsms). At the moment I can achieve this by typing SHIFT 'letter' from the keyboard, but what I am trying to do is duplicate the navigation bar as found on an IPod Touch.

Is there a builtin function available (have hunted thru the wiki with no luck) to achieve this, or am I going to have to write another script to send the keycode to the current window?

Would like to avoid writing a script (as my python is not great), but if that is what's required, will give it a go.

I would like to add this to my skin mod sometime in the future, but will probably not happen for a couple of weeks.

Wyrm (xTV SAF)
seems to be unavailable but some simple code should enable usage of Action(<window>,0xF100+ascii of key). will chat with jmarshall
I think I'd prefer a built in for this - JumpToLetter(_letter_). Reason is that the SHIFT-letter stuff relies on the list having focus to channel the action in the appropriate way.

This would be easy enough to do - post a ticket on trac and I'll either give directions or will implement.

Cheers,
Jonathan
Jonathan,Thanks will get onto this later today (on my way out now). Thought of doing this as spiff suggested, but thought it sounded a bit hacky.

Wyrm
Jonathan,

Ticket posted, http://trac.xbmc.org/ticket/7369 . Hope this is helpful.

thanks again
Wyrm
I have had a chance to write a script to try and implement this and Yes I have run into the problem as jmarshall mentioned. The list of letters has the focus and so when my script sends the keycode it goes to the window with the letter list in it, NOT the main file view window.

I'm currently using 'SendKey' and not 'Action' (as suggested by spiff) as I thought initially that the keycode would get sent to all visible windows (after a bit more thought, realised how little sense that made). So I need to use 'Action(<window>,0xF100+ascii of key)' as suggested by spiff.

In order to keep this as general purpose as possible, is there a function that I can use in a script to find the window id of the previous window (I've looked and can't find anything in the wiki). Then I can implement in the following fashion:

  • change window focus to previous window
  • send keycode to the window (using spiffs code)
  • change window focus back to letters list window
So is this doable or am I wasting my time.

wyrm