Kodi Community Forum

Full Version: Keyboard.xml changes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey,

I have a keyboard.xml set up for subtitles, using the action "shhosubtitles" assigned to a remote button.

However when I now press this button, it no longer activates subtitles, it leaves them disabled but allows me tk scroll throu different locations where they could be placed?

Any ideas if this is a bug or if the keyboard.XML can be changed and what to.

Cheers,
Why did you have to keymap that? Isn't that a built in feature of XBMC? Isn't it the letter T? I know I've got it set up on both my remotes to turn the subtitles on and off and I've never touched the keymap file for that function.
clubwerks Wrote:Why did you have to keymap that? Isn't that a built in feature of XBMC? Isn't it the letter T? I know I've got it set up on both my remotes to turn the subtitles on and off and I've never touched the keymap file for that function.

Hi,

I used the edit keyboard.xml feature of mcrremote. I then assigned a generic button on my remote to the preassigned "showsubtitles" option within the drop down menu.

All my other key maps work correctly but since (I don't know exactly what day) that function changed from enabling subtitles on and off to relocating them to different locations on the screen such as fixed/bottom of video/top/ etc etc etc ... I havnt changed the keymap it's stillmusing the settings provided by the drop down menu in the edit keyboard.xml section of mceremote.

I've tried remapping it but it does the same thing?

Was/were keymaps changed in some way? I'd like to Map my subtitles back so I can enable them via a button again Smile
As far as I know, the "showsubtitles" just toggles subtitles on and off. Maybe the action behaves differently under different circumstances e.g. if XBMC can't find the subtitles of if there are multiple subtitle streams.

By default T is indeed mapped to the showsubtitles action, but mapping other keys to it as well does no harm.

JR
jhsrennie Wrote:As far as I know, the "showsubtitles" just toggles subtitles on and off. Maybe the action behaves differently under different circumstances e.g. if XBMC can't find the subtitles of if there are multiple subtitle streams.

By default T is indeed mapped to the showsubtitles action, but mapping other keys to it as well does no harm.

JR

I didn't mean to imply that it would not work, I was just wondering why it had to be done when it was already mapped by default.
clubwerks Wrote:I didn't mean to imply that it would not work, I was just wondering why it had to be done when it was already mapped by default.

Hey,

The reason I mapped the showsubs to a button, is that I am using a genreic MCE remote with a spare button, so i used xbmc MCEREMOTE plugin and I captured the key sequence and then assigned it (via the drop down menu) to show subtitles.

This worked perfectly for months, until very recently (I'm now using nightlies) where upon, when I press that same button, even on films I have used it on before, it no longer activates subs, it provides me with an option to move them (if they are active) or does nothing if they are de-activated?

Perhaps it must be something with my setup? Weird as this is a fresh build that havnt even moved my library into yet Huh

At least I know nothings changed and it must be me... Not sure how im gonna fix it though as it's currently set to "showsubtitles" so I've no idea what else I can do?

Cheers,
PatrickBateman Wrote:This worked perfectly for months, until very recently (I'm now using nightlies)

Aaah, you didn't say you were using a nightly build.

The subtitle handling has changed in the nightly builds. Exactly how it's changed I'm not sure because I haven't worked on that bit of code, but it appears to use an add-on by default. Having said that, I've just tried the 7th November build and pressing T still behaves as expected. However clicking the subtitles button in the OSD brings up a completely different dialog to Dharma.

It would be interesting to look at a debug log to see what action XBMC is executing when you press T and also when you press your custom mapped button.

JR
jhsrennie Wrote:Aaah, you didn't say you were using a nightly build.

The subtitle handling has changed in the nightly builds. Exactly how it's changed I'm not sure because I haven't worked on that bit of code, but it appears to use an add-on by default. Having said that, I've just tried the 7th November build and pressing T still behaves as expected. However clicking the subtitles button in the OSD brings up a completely different dialog to Dharma.

It would be interesting to look at a debug log to see what action XBMC is executing when you press T and also when you press your custom mapped button.

JR

Hi JR,

I'm going to re-do my install again (as its empty/new anyway) so i will switch to the newest nightlie and ensure my skin is on the latest version too.

Ill drop a log up and we can see what its doing.

Basically, the button i mapped from the remote was some generic key, so i assigned subtiles to that key (enable/disable) using "showsubtitles" from the drop down menu in the MCRRemote "edit keyboard.xml" section of the plugin.

Until the most recent nightlies, it worked, then, upon pressing the key, it now gives me the option to relocate the subtitles, "Fixed/Bottom/Top etc etc" and when i check the "keyboard.xml" which was setup and created by using the MCERemote Plugin, it still shows "ShowSubtitles" as the command assigned to the remotes keypress.

But ill redo it again and will post a log up if i cant figure it out.

Thanks for the information/reply, and sorry for not being more precise with my inital post. its unlike me, i do usually pop all the relevant info in my posts Blush
Hi JR,

A quick update re: this issue:
I've gone back into my keyboard.xml and here is waht it is currently set to.

Code:
<!-- Keymap for the keyboard shortcuts configured by MSRemote.reg -->
<!-- J. Rennie 23rd September 2010 -->
<keymap>
  <global>
    <keyboard>
      [b]<t mod="ctrl,alt">showsubtitles</t>[/b]
      [b]<t mod="ctrl,shift">[/b]
      <r mod="ctrl">contextmenu</r>
      <m mod="ctrl,shift">fullscreen</m>
      <o mod="ctrl">togglefullscreen</o>
      <g mod="ctrl">info</g>
      <!-- Windows button: mapped to ctrl-shift-W by MSRemote.reg -->
      <w mod="ctrl,shift">Notification(Key, Windows button, 3)</w>
      <!-- Some MS remotes have the four coloured buttons. These are mapped -->
      <!-- to ctrl-alt-1 to 4 by MSRemote.reg. -->
      <!-- Red button: ctrl-alt-1: this is a placeholder -->
      <one mod="ctrl,alt">Notification(Key, Red button, 3)</one>
      <!-- Green button: ctrl-alt-2: this is a placeholder -->
      <two mod="ctrl,alt">Notification(Key, Green button, 3)</two>
      <!-- Yellow button: ctrl-alt-3: this is a placeholder -->
      <three mod="ctrl,alt">Notification(Key, Yellow button, 3)</three>
      <!-- Blue button: ctrl-alt-4: this is a placeholder -->
      <four mod="ctrl,alt">Notification(Key, Blue button, 3)</four>
    </keyboard>
  </global>
</keymap>

What i am trying to achieve here is have that button on my MCERemote that sends ctrl,alt,T to activate subtitles (which it used to on dharma and early nightlies) and then my next hurdle is to set the ctrl,shift,T so open my tvshows (but i havent figured out how that should be done yet either)

Has something changed within these parameters in the more recent nightlies?
Could you possibly help/advise with getting these settings functioning again.

Cheers,
Pat~

Edit1
After tinkering around it seems that "ctrl,alt,T" has been assigned to subtitle location, so even when i map that button on the remote to "ebable subtitles" it ignores that mapping as it must be set somewhere else? Can this be fixed or am i scuppered?

EDIT2
Ok, ive not tried mapping ctrl,shift,T to "showsubtitles" and this works?
So it must have something to do with "ctrl,alt,t" being changed in the nightlies to "subtitle location"? Can i change that somehow?
Hmm, I've just looked at the keymap in the 7th Nov build and it has no entry for <t mod="ctrl,alt"> though I note there is an entry <t mod="ctrl">SubtitleAlign</t>.

Anyhow, mappings you put in your userdata keyboard.xml override the system keymap, however if you define <t mod="ctrl,alt"> globally it can be overridden in other sections. I would guess you need:

Code:
<keymap>
  <global>
    <keyboard>
      etc
    </keyboard>
  </global>
  <fullscreenvideo>
    <keyboard>
      <t mod="ctrl,alt">showsubtitles</t>
    </keyboard>
  </fullscreenvideo>
</keymap>

This will override any default mappings for ctrl-alt-t when you're playing a video.

If you're editing through the MCERemote add-on it's probably running my KeyMapEdit applet. If so use Keymap/Append section to add a FullScreenVideo section then add the mapping for ctrl-alt-t to that section.

I'm still puzzled as to how you've ended up with a keyboard.xml with a mapping for ctrl-alt-t in it.

JR
Hi JR,

Thanks for the update/reply, heres some info:

The reason my "keyboard.xml" has "ctrl,alt,t" in it is because this was a recorded keystroke using MCRRemotes "Detect Keystroke" from a button on my remote... I detected the keypress from the button on the remote, and then selected "showsubtitles" as its new function from the drop down menu.

It worked previously and all other mappings in there work fine.

Herw is what i have now:
Code:
<!-- Keymap for the keyboard shortcuts configured by MSRemote.reg -->
<!-- J. Rennie 23rd September 2010 -->
<keymap>
  <global>
    <keyboard>
      <t mod="ctrl,alt">showsubtitles</t>
      <r mod="ctrl">contextmenu</r>
      <m mod="ctrl,shift">fullscreen</m>
      <o mod="ctrl">togglefullscreen</o>
      <g mod="ctrl">info</g>
      <!-- Windows button: mapped to ctrl-shift-W by MSRemote.reg -->
      <w mod="ctrl,shift">Notification(Key, Windows button, 3)</w>
      <!-- Some MS remotes have the four coloured buttons. These are mapped -->
      <!-- to ctrl-alt-1 to 4 by MSRemote.reg. -->
      <!-- Red button: ctrl-alt-1: this is a placeholder -->
      <one mod="ctrl,alt">Notification(Key, Red button, 3)</one>
      <!-- Green button: ctrl-alt-2: this is a placeholder -->
      <two mod="ctrl,alt">Notification(Key, Green button, 3)</two>
      <!-- Yellow button: ctrl-alt-3: this is a placeholder -->
      <three mod="ctrl,alt">Notification(Key, Yellow button, 3)</three>
      <!-- Blue button: ctrl-alt-4: this is a placeholder -->
      <four mod="ctrl,alt">Notification(Key, Blue button, 3)</four>
    </keyboard>
  </global>
<fullscreenvideo>
    <keyboard>
      <t mod="ctrl,alt">showsubtitles</t>
    </keyboard>
  </fullscreenvideo>
</keymap>

I've tried it with and without the same line entry under global keyboard "<t mod="ctrl,alt">showsubtitles</t>" and it still doesnt work.

Pressing the button on the remote still brings up the option of moving the subtitles but not enabeling/disabling them?

Any ideas?
Its so strange as it works fine on dharma? i dont know what nightly broke it but it must have been recently that something was changed with subtitles etc?



EDIT:
Ive just been messing about and by removing the "alt" it now works? Although that button is defiently sending an "alt" command as detected by the "detect keypress" section?
Weird?
Code:
<!-- Keymap for the keyboard shortcuts configured by MSRemote.reg -->
<!-- J. Rennie 23rd September 2010 -->
<keymap>
  <global>
    <keyboard>
      <t mod="ctrl">showsubtitles</t>
      <r mod="ctrl">contextmenu</r>
      <m mod="ctrl,shift">fullscreen</m>
      <o mod="ctrl">togglefullscreen</o>
      <g mod="ctrl">info</g>
      <!-- Windows button: mapped to ctrl-shift-W by MSRemote.reg -->
      <w mod="ctrl,shift">Notification(Key, Windows button, 3)</w>
      <!-- Some MS remotes have the four coloured buttons. These are mapped -->
      <!-- to ctrl-alt-1 to 4 by MSRemote.reg. -->
      <!-- Red button: ctrl-alt-1: this is a placeholder -->
      <one mod="ctrl,alt">Notification(Key, Red button, 3)</one>
      <!-- Green button: ctrl-alt-2: this is a placeholder -->
      <two mod="ctrl,alt">Notification(Key, Green button, 3)</two>
      <!-- Yellow button: ctrl-alt-3: this is a placeholder -->
      <three mod="ctrl,alt">Notification(Key, Yellow button, 3)</three>
      <!-- Blue button: ctrl-alt-4: this is a placeholder -->
      <four mod="ctrl,alt">Notification(Key, Blue button, 3)</four>
    </keyboard>
  </global>
<fullscreenvideo>
    <keyboard>
      <t mod="ctrl">showsubtitles</t>
    </keyboard>
  </fullscreenvideo>
</keymap>

Now if i remove your "fullscreenvideo" section, it breaks again. So it only works if i remove the "alt" and add your "fullscreenvideo" section?

So its kinda working and at least its given me the ability to have subs back at a switch of a button.
Cheers JR really appreciate your help Nod

Any idea how to get "Ctrl,Shift,T" to open "TV Shows" and when closed/exit or backing out of it, to take me directly to the home screen? Wink
Hey,

Any update on mapping "ctrl,shift,t" to open my tv shows in the video library? I've tried a few but they don't seem to work correctly when exiting the menu? I'd like to enter tv shows directly and then exit directly to the home screen when pressing "delete" the mappings ive tried seems to take me back through many levels of my history?

Additional, can I somehow change my "vol_up" and down keys on my remote (which send the vol_up/down) commands to send xbmc volume controls instead?

I assume this will be done via a reghack but do you happen to know where so that i can do it manually for just the volume keys?

Cheers,
Pat~

Currently using:
xbmc.activatewindow(myvideos,tvshows) but this seems to take me back via my history/path of getting there, rather than directly to the screen when pressing "delete"

I've tried the reg:key replacement that JR posted for mce remotes, but as mine is just generic, is there another solution as this doesn't work for those types of remotes.

I just need to remap the windows system vol_up globally, so that when my remote sends that command it remaos it from ctrl,alt,up in windows to f8..

I'll keep at it and report back.
Your remote is probably sending APPCOMMAND messages for the volume buttons. If so just create a mapping file for the appcommands. Create an appcommand.xml in the same directory (userdata/keymaps) as the keyboard.xml, and in that file put:

Code:
<keymap>
  <global>
    <appcommand>
      <volume_down>volumedown</volume_down>
      <volume_up>volumeup</volume_up>
    </appcommand>
  </global>
</keymap>

This tells XBMC to handle the APPCOMMANDS itself and not pass them to windows. NB this only works in the nightly builds, but IIRC you are using a nightly build.

As for the navigation, I don't have any TV shows in my library, but I found that ActivateWindow(videolibrary, movies) takes me to the root of the movies.

JR
Hey JR,

Thanks for Thst, I'll try it right away...

Here is my remote:

VRC-1100
http://wiki.xbmc.org/index.php?title=Rem...ol_Reviews

Here are it's Recorded key presses:
http://forum.xbmc.org/showpost.php?p=729191&postcount=6

I've tired "sharp keys" reg editing ... But I can't figure out the volume so hopefully that will work, I'll post back my findings for others to reference from.

Yea, I'm using a similar command for tv shows, but weirdly, if I press "pictures", then "music" then "tv shows" when I navigate back (pressing delete) toward the home menu, it takes me back via my path? Back to music, then to pictures then home? The others dont do this? I'll try another method and again post back for others to reference from.

Thanks again JR really appreciate it... Nod

P.s
I reinstalled the latest nightly, and usually when I edit keyboard XML from the mceremote plugin I get the ability to detect key presses, This seems to be missing from the latest nightlys, I haven't changed my plugins or removed any just xbmc it's self but now when I press edit keyboard XML it just takes me directly to the text file with no drop down menu or little program to detect key presses like it usually does, Any ideas?

Sorry for being a pest Laugh
Hey JR,
That command works perfectly Laugh you wouldn't believe what I have tried to remap they key Oo I never knew about app commands and had been trying to edit the reg etc...


Thanks to JR for these methods... I'll collect all the relevant info from this thread and make a final post containing all the code posted by JR so other generic mce remote users can copy or reference from it.

Thanks again JR
Really appreciate that, i really do!

EDIT:
Working "keyboard.xml" for VRC-1100 Generic MCE Remote.
http://wiki.xbmc.org/index.php?title=Rem...ol_Reviews

List of its known recorded key presses:
http://forum.xbmc.org/showpost.php?p=729191&postcount=6

This xml will remap:
"Yellow" = TVShows
"Blue" = Music
"Green" = Pictures
"Red" = Movies

Button below "Yellow" = "Fullscreen Toggle"
Button below "Blue" = "info"
Button below "Green" = "subs on/off"
Button below red = "full Screen Video"

Record = "Context Menu"
Volume up/down = "xbmc Volume up/down"
Channel up/down = "audio delay plus/minus" (until AE hopefully fixes these delay issues)

Close = Close xbmc (alt+F4)
Clear = Escape
Back = Delte

all other keys function as expected.
Thanks for JR for all the help!

Code:
<!-- Keymap for the keyboard shortcuts configured by MSRemote.reg -->
<!-- J. Rennie 23rd September 2010 -->
<keymap>
  <global>
    <keyboard>
      <t mod="ctrl,shift">xbmc.activatewindow(videolibrary,tvshows)</t>
      <t mod="ctrl">showsubtitles</t>
      <r mod="ctrl">contextmenu</r>
      <m mod="ctrl,shift">fullscreen</m>
      <o mod="ctrl">togglefullscreen</o>
      <g mod="ctrl">info</g>
      <pageup>audiodelayplus</pageup>
      <pagedown>audiodelayminus</pagedown>
      <!-- Windows button: mapped to ctrl-shift-W by MSRemote.reg -->
      <w mod="ctrl,shift">Notification(Key, Windows button, 3)</w>
      <!-- Some MS remotes have the four coloured buttons. These are mapped -->
      <!-- to ctrl-alt-1 to 4 by MSRemote.reg. -->
      <!-- Red button: ctrl-alt-1: this is a placeholder -->
      <one mod="ctrl,alt">Notification(Key, Red button, 3)</one>
      <!-- Green button: ctrl-alt-2: this is a placeholder -->
      <two mod="ctrl,alt">Notification(Key, Green button, 3)</two>
      <!-- Yellow button: ctrl-alt-3: this is a placeholder -->
      <three mod="ctrl,alt">Notification(Key, Yellow button, 3)</three>
      <!-- Blue button: ctrl-alt-4: this is a placeholder -->
      <four mod="ctrl,alt">Notification(Key, Blue button, 3)</four>
    </keyboard>
  </global>
<fullscreenvideo>
    <keyboard>

Here is the "appcommand.xml" for the volume commands:

Code:
<keymap>
  <global>
    <appcommand>
      <volume_down>volumedown</volume_down>
      <volume_up>volumeup</volume_up>
    </appcommand>
  </global>
</keymap>

Again thanks to JR for all the help in configuring this remote! Now works perfectly for my needs.

this file will be a great starting point for new/other VRC-1100 users.
Pages: 1 2