How do you disable the \ back slash key?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
djroketboy Offline
Senior Member
Posts: 109
Joined: Nov 2009
Reputation: 1
Post: #1
Is this possible? I keep hitting it randomly and it makes the screen tiny. Normally its not a problem (really annoying though), but now that I made XBMC my default at logon (linux); pressing the \ again does nothing, and XBMC locks up.

dang... looked in the keymap.xml file like 30 times... removed the backslash line, and its all good now.
(This post was last modified: 2011-03-04 23:39 by djroketboy.)
find quote
live4ever Offline
Fan
Posts: 605
Joined: Sep 2006
Reputation: 4
Post: #2
I'm having trouble doing this on Windows - XBMC on screen 2 in fake fullscreen mode. It works fine on OpenELEC and Mac OS X by editing:
Code:
<backslash></backslash>
in keymap.xml

It wouldn't be such a problem if it would toggle fullscreen on screen 2 in Windows and not bring the XBMC window back to screen 1.
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,239
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #3
In v10.1 having <backslash></backslash> in a keymap will do nothing because XBMC will see there's no action and just discard that line. I'm surprised it works in Linux and OSX because as far as I know that bit of the code is not OS dependant.

Anyhow, the solution is to map backspace to something harmless. In the nightlies there is a "noop" action that does nothing, but this isn't available in v10.1. How about:

Code:
<backslash>osd</backslash>

Unless you're playing a video this will do nothing, and even if you're playing a video all that will happen is that the OSD will appear.

JR
find quote
live4ever Offline
Fan
Posts: 605
Joined: Sep 2006
Reputation: 4
Post: #4
Yeah I just meant that 'key' in advancedsettings.xml (I set it to go to the home window, not left blank) - on another Windows box (but only one screen attached) I've got it to work, but the one with a LCD + Plasma doesn't. I'll post the keymap.xml when I get a chance along with a debug log while pressing '\'.
find quote
sjw1 Offline
Senior Member
Posts: 151
Joined: Feb 2011
Reputation: 0
Post: #5
How can I change the toggle fullscreen button from backslash to the # key?
I've tried adding
<Hash>ToggleFullScreen</Hash>
and
<#>ToggleFullScreen</#>
to my keymap.xml file but it doesn't work. If I change it to another letter it works.
Reason I want to do this (short term maybe) is that for some reason, when I send the backslash key from my Harmony One (set up as an MCE Keyboard), for some reason it sends the # key. Frown
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,239
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #6
If you use a nightly build then <hash>ToggleFullScreen</hash> will work.

If you use Dharma it depends on your keyboard layout because the hash key is in different places on different keyboards, and Dharma doesn't handle this especially elegantly. Your best option is to enable debug logging from System settings, System, Debugging, press the button on your remote and see what XBMC receives. On my system if I press # on my UK keyboard my log shows:

DEBUG: SDLKeyboard: scancode: 43, sym: 92, unicode: 35, modifier: 0
DEBUG: CApplication::OnKey: 61539 pressed, action is Number3

i.e. it thinks I've pressed the "3" key. I think this is because on the US keyboard (which Dharma tends to assume you're using) # is shift-3. You can add a mapping for the "3" key:

<three>ToggleFullScreen</three>

which is probably OK because you don't press "3" very often when using XBMC.

See http://wiki.xbmc.org/index.php?title=Log_File for how to get at the log file. If you use Windows just press Windows-R and in the Run dialog type:

"%appdata%\xbmc\xbmc.log"

(including the quotes) and click OK.

JR
find quote
sjw1 Offline
Senior Member
Posts: 151
Joined: Feb 2011
Reputation: 0
Post: #7
Thanks for that. Smile
It's interesting what you have said about the number three - and that Dharma assumes I'm using a US keyboard.
As I said, the reason I'm asking about re-mapping the key is that when I press the backslash selection on the Harmony (set to emulate an MCE Keyboard), if I'm watching a movie then it is interpreted as a 3 - so a 3 appears at the top in the time bar - as though I was doing a 'quick navigate' to a point in the film (the way you can type in a time using numbers).
Using notepad, this appears as a # symbol - which ties in with what you have said about xbmc interpreting a # as a 3. I don't want to use the number three as the full screen button because I do use those number buttons.
Can (or even should I?) xbmc bechanged to know I'm on a UK keyboard?
Do you have any knowledge of how/why the Harmony is sending a seemingly US signal and how/if it can be changed? The common one I see in work is the " and @ symbol swapped around - which is also the case with the Harmony and notepad.
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,239
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #8
Upgrading to a nightly build, or waiting a few weeks for the v11.0 beta to start, is the best way to fix this.

JR
find quote
sjw1 Offline
Senior Member
Posts: 151
Joined: Feb 2011
Reputation: 0
Post: #9
jhsrennie Wrote:Upgrading to a nightly build, or waiting a few weeks for the v11.0 beta to start, is the best way to fix this.

JR
So with my current setup (10.1), I can't change the toggle fullscreenoption to use the # key?
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,239
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #10
sjw1 Wrote:So with my current setup (10.1), I can't change the toggle fullscreenoption to use the # key?

XBMC will never see a # keypress, but if XBMC sees the # keypress as "3" then you can map <three> to ToggleFullScreen. I don't think this will interfere with using the 3 button when entering the time.

JR
find quote
sjw1 Offline
Senior Member
Posts: 151
Joined: Feb 2011
Reputation: 0
Post: #11
jhsrennie Wrote:XBMC will never see a # keypress, but if XBMC sees the # keypress as "3" then you can map <three> to ToggleFullScreen. I don't think this will interfere with using the 3 button when entering the time.

JR
...but when I press 3 wanting to enter the number 3 (to go a point in time), it will toggle the fullscreen won't it?
find quote
jhsrennie Offline
Team-XBMC Developer
Posts: 7,239
Joined: Nov 2008
Reputation: 118
Location: Chester, UK
Post: #12
sjw1 Wrote:...but when I press 3 wanting to enter the number 3 (to go a point in time), it will toggle the fullscreen won't it?

Ah, yes, it does.

In text entry dialogs the keypresses are handled separately, so pressing 3 will always enter a "3" and won't execute any actions. However it looks as if the time entry doesn't work this way. However this works:

Code:
<keymap>
  <global>
    <keyboard>
      <three>togglefullscreen</three>
    </keyboard>
  </global>
  <fullscreenvideo>
    <keyboard>
      <three>number3</three>
    </keyboard>
  </fullscreenvideo>
</keymap>

JR
find quote