Idiot Proof Keymapping.
#1
Keymapping is one of the few things that still seems to need raw XML editing to get working right. You have to enable debugging, look at the key/button codes correlate them to what command you want where.

Many games on all platforms (Windows, Mac, Linux, Xbox, Wii...) have a config menu with a list of game controls. "Move left. Move Right. Shoot. Jump."

You select what you want to do. Then it says "press the key you want to do this action" and it's mapped.

Maybe a section under System where it had all the possibilities of commands, you select it then hit any key on your LIRC remote, Xbox controller, keyboard, etc and it maps it, and saves the xml.
Reply
#2
This is non-trivial in xbmc as different keys can have different actions depending on context. Not to mention the nearly unlimited input device possibilities and cross-platformness. Any suggestions (or patches!) of a way to implement this cleanly and intuitively would be appreciated.
Reply
#3
Yes, it can be quite a beast to tackle, and i'm not sure of how it would actually work within XBMC.

There are several threads regarding this task and at one point someone wrote an application to help out.

Though it was some time ago and I think it only worked for Xbox:
http://www.xbox-scene.com/xbox1data/sep/...XboHgX.php

Thread:
http://www.xbmc.org/forum/showthread.php?t=11163

I think the largest issue is what althekiller said is that there are numerous layers to the keymapping.

Pretty much each screen gets it's own set of mappings, and each screen can have numerous inputs. And then there is taking into account interactions with the OS in question.
Reply
#4
althekiller Wrote:This is non-trivial in xbmc as different keys can have different actions depending on context. Not to mention the nearly unlimited input device possibilities and cross-platformness. Any suggestions (or patches!) of a way to implement this cleanly and intuitively would be appreciated.

How about a selection dialog that has

Global|MyFiles|MyMusicPlaylist|etc
gamepad|joystick (wiiremote)|joystick(othernames)|remote|keyboard

and then dialog similar to add/remove source that had a table with 2 columns buttonID/name | action & add|remove|change|ok|cancel buttons.
If you click change on one, you get a dialog that says 'please press the key you want for $action'

Not that I'm volunteering, but it should be doable via python.

EDIT: I spent about 20hrs doing the shading on this mockup so don't laugh.

Image
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#5
+1 for a keymap editor. Thanks for volunteering ;p
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
althekiller Wrote:This is non-trivial in xbmc as different keys can have different actions depending on context. Not to mention the nearly unlimited input device possibilities and cross-platformness. Any suggestions (or patches!) of a way to implement this cleanly and intuitively would be appreciated.

Much has changed, since I last looked at the single keymap.xml, There do seem to be a billion and one options.

However, for the basic user, I can't see that you'd want to map more than a few screens. (Although it would be an evil trick to map Home to normal then map Movies up to down and left to right).

I'm not much of a coder, but I see it like this:
  • Global
  • Home
  • Music
  • Video

Then under that, stop, pause, up, down, for the different options. The defaults work for most people, but it'd just be for the novice that wanted to switch up the basics.
Reply
#7
How about having an option under each section which maps keys for the particular mode.
ie

Video
Video specific keymap
Music
Music specific keymap
Pictures
Picture specific keymap
System
Global keymap
Reply
#8
altering (ALL) different variations and combos of keymaps would be a lot of work and judging just by the little experience i have had with editing my keymaps on my own systems it would more than likely become a great big mess.
but i don't think that average joe dipstick really needs that many options.
i think even the ability to alter just basic keymapping functions would satisfy most users and those that would need to alter maps outside of the realm of the basic functions should have the knowing to do so manually by editing the
xml files to add/remove/alter the functions of a button or key.
i have been using this program long enough to be comfortable editing my keymaps.
it really wouldn't matter to me much if a function like this was ever added but as someone who has friends and family that ive tried to setup XBMC for (most of which are nearly 100% computer illiterate) i know that the user base of this program even with as large as it currently is it could be twice as large if it could find more ways to cater to the average user without dumbing down XBMC's amazing features Smile

rwparris2 Wrote:EDIT: I spent about 20hrs doing the shading on this mockup so don't laugh.
it looks great...only 20 hours huh...Rolleyes
Reply
#9
IMO this points mainly to:

1. The flexibility of the keymapping system - it allows per-window mappings.
2. The ludicrousness of 1 in that you have to repeat a whole bunch of stuff all over keymap.xml. ***
3. The inflexibility of the keymapping system - it ONLY allows per-window mappings, where as in some situations a much finer level of control is required (consider the "Select" action on list items for instance - there's no way to define what it does for folders and files separately, thus the problem with songs playing on select rather than queueing on select).

While I think it'd be nice to be able to alter the keymap from the UI, I personally believe that more gains would be had by altering the way we do keymapping in general.

A good start would be the suggestions above - finding out what a user may wish to be able to change in terms of the keymap, and using that as a base for what the system needs to be able to support.

Cheers,
Jonathan

*** I can say this without offending anybody, given that I wrote the damn thing :p
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
jmarshall Wrote:While I think it'd be nice to be able to alter the keymap from the UI, I personally believe that more gains would be had by altering the way we do keymapping in general.

A good start would be the suggestions above - finding out what a user may wish to be able to change in terms of the keymap, and using that as a base for what the system needs to be able to support.

+1
Reply
#11
Is that a volunteer I see? Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#12
Yea count me in, I'm not sure where to start though. May I propose the following idiot proof keymapping ?

Image

Image

Fine, I'll keep dreaming. Laugh
Reply
#13
Agreed - It's a nice interface. The translation to XBMC-land would be "Given we have _foo_ context, and _bar_ action, which button (if any) do you want to do that action?"

The key is finding the set from which _foo_ comes, and once done, the corresponding set from which _bar_ comes. The rest is mere details.

Hopefully this thread will yield a volunteer to define those sets. Off the top of my head we have for the _foo_ set:

1. Basic navigation (directional arrows, forward/backward through screens + dialogs) from any control.
2. Focus on a folder item in a list.
3. Focus on a file item in a list (may be able to combine with 2 in some way?)
4. Focused on an input control (edit control).
5. Playing music or video (while in the UI).
6. Playing music, video, slideshow (full screen).

Another question is when we have one or more context's that may apply, which one takes priority? Think about pressing "Play" while something is paused, while also focused on a playable item in a list. Ideally such situations wouldn't exist, but I'm not sure we can guarantee that.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#14
Does the Keymap.xml contain sections of all available windows for which XBMC has the ability to assign keys to?
Reply
#15
the world will always invent a better fool.
Reply



Logout Mark Read Team Forum Stats Members Help
Idiot Proof Keymapping.2
This forum uses Lukasz Tkacz MyBB addons.