Android Not Sending Correct Keypresses (ESC, Backspace, Shift) on ODROID U2
#1
Bug 
I'm using a Logitech K400 with an ODROID U2, and I've tried with both XBMC Android nightly and the latest libstagefright build from 2/19, but I can't get the ESC, Backspace and Shift keys to function properly, as they would in the Windows builds. I'm running the Cyanogenmod 10.1 nightly builds and CM seems to handle the keystrokes fine within the OS, but not within XBMC. Should I be looking into modifying the keyboard.xml? Has anyone else seen this issue with this keyboard and Android XBMC?
Reply
#2
I dont have a solution for you i'm afraid.

I installed xbmc onto an android box for a friend and i encountered this same issue with his k400 keyboard.

But I had the same problems with a different wieless keyboard too, so i dont think its a problem that is specific to the keyboard. seems more like an xbmc app problem.

i would imagine it can be fixed in the keyboard.xml file but i haven't tried it yet.

i just read somewhere that if you enable xbmc debug log and restart xbmc, you can then press the offending buttons on you keyboard and then look in the log to see what xbmc is picking up.

that might be a start to figuring out this issue. but unfortunately i have handed over the box so i cant do that.
Reply
#3
I have found a way to fix the issue. It takes some trickery with checking the debug log and finding what key xbmc is interpreting your input as. Once you have this, you need to edit the keyboard.xml file in userdata to match the key found in the logs.
Reply
#4
I was thinking that this might take some editing in keyboard.xml, but I was wondering if I was the only one having this issue. If many other Android XBMC users are having this issue, I think that the devs should be investigating this issue a little closer. It shouldn't take manual modification of the application files to get basic functions like "Go Back" to work. I just got back from vacation, so I will be looking into this more this week. Hopefully I can get a working set of keyboard commands and share with the forum. OR if anyone has already done this and can share their file, please do.
Reply
#5
So I've been looking at the debug log and these are the results of the key presses.

ESC
DEBUG: : Trying Hardy keycode for 0xf200

DEL
DEBUG: : 0 (0xf200) pressed, action is

BACKSPACE
DEBUG: : delete (0xf087) pressed, action is

I think this is a larger issue than just trying to remap in keyboard.xml. I don't even know whats getting passed when ESC is hit. Are any of the XMBC devs that have ODROIDs seeing this issue?
Reply
#6
i found this but haven't looked into it properly to see if it helps with our problem:

http://www.mobileread.com/forums/showthr...p?t=159538
Reply
#7
So I posted in the libstagefright post and I think Koying is already aware of the issue. I have since picked up Yatse from the Android Market and using that in the timebeing. I think this post is good to keep around to let others know that this is a known issue, happening to others. I saw a post on xda about a custom build of xbmc for android settop boxes. I may check that out and see if they do anything special for keyboard mapping.
Reply
#8
Hi there guys, long time reader, first time poster:

I suffer from this issue on my Mygica ATV1200 with my logitech bluetooth keyboard.

I made a temporary workaround based on a user called Awol which I found on the xbmcandroid forums.

The bad:
It doesn't really fix any of the "broken" keypresses.

The good:
It allows you to map the functions of the "backspace" and the "escape" keys to different ones.

The fix:
To change keys one has to replace or edit the keymap.xml file located in <insert location of SD card>/Android/data/org.xbmc.xbmc/files/userdata/keymaps/

My keymap.xml file contains the following added hotkeys.

h (for home) = escape
f (for favorites) = favorites
\ (aka backslash) = backspace

If you want to, you can change the buttons in this xml files, it's not exactly rocket surgery. Just remember that thing listed under "global" work from all locations within XBMC and things listed under FullscreenVideo only work from the "Now Playing screen"

The keymap.xml can be found here:
http://www.knuffelbaar.nl/xbmc/keymap.xml

I hope this helps you guys out for now until the issue gets fixed by the devs.
Reply
#9
It is really annoying that I cannot use my Shift key. When I press it, it moves the cursor to the left. So I cannot enter any URL, because : and / need the Shift key
Reply
#10
These characters should be in the symbols part of the on-screen input screen of XBMC. It's neither fast nor practical, but I guess we'll have to make do with what we've got.
Reply
#11
Here is my keyboard.xml. I used KeyMapEdit to adjust it. Keep in mind, THIS XML MAY NOT WORK FOR YOU!!!! I used debugging to find my specific keys and changed the xml accordingly.

keyboard.xml
Code:
<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<!-- The <global> section is a fall through - they will only be used if the button is not          -->
<!-- used in the current window's section.  Note that there is only handling                       -->
<!-- for a single action per button at this stage.                                                 -->
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox       -->
<!-- gamepads.                                                                                     -->
<!-- The format is:                      -->
<!--    <device>                         -->
<!--      <button>action</button>        -->
<!--    </device>                        -->
<!-- To map keys from other remotes using the RCA protocol, you may add <universalremote> blocks -->
<!-- In this case, the tags used are <obc#> where # is the original button code (OBC) of the key -->
<!-- You set it up by adding a <universalremote> block to the window or <global> section:       -->
<!--    <universalremote>             -->
<!--       <obc45>Stop</obc45>         -->
<!--    </universalremote>            -->
<!-- Note that the action can be a built-in function.                 -->
<!--  eg <B>XBMC.ActivateWindow(MyMusic)</B>                         -->
<!-- would automatically go to My Music on the press of the B button. -->
<!-- Joysticks / Gamepads:                                                                    -->
<!--   See the sample PS3 controller configuration below for the format.                      -->
<!--                                                                                          -->
<!--  Joystick Name:                                                                          -->
<!--   Do 'cat /proc/bus/input/devices' or see your xbmc log file  to find the names of       -->
<!--   detected joysticks. The name used in the configuration should match the detected name. -->
<!--                                                                                          -->
<!--  Button Ids:                                                                             -->
<!--   'id' is the button ID used by SDL. Joystick button ids of connected joysticks appear   -->
<!--   in xbmc.log when they are pressed. Use your log to map custom buttons to actions.      -->
<!--                                                                                          -->
<!--  Axis Ids / Analog Controls                                                              -->
<!--   Coming soon.                                                                           -->
<keymap>
  <global>
    <keyboard>
      <p>Play</p>
      <q>Queue</q>
      <f>FastForward</f>
      <r>Rewind</r>
      <left>Left</left>
      <right>Right</right>
      <up>Up</up>
      <down>Down</down>
      <left mod="ctrl">analogseekback</left>
      <right mod="ctrl">analogseekforward</right>
      <pageup>PageUp</pageup>
      <pagedown>PageDown</pagedown>
      <return>Select</return>
      <enter>Select</enter>
      <delete>Back</delete>
      <backspace>Back</backspace>
      <key id="65446">Back</key>
      <m>ActivateWindow(PlayerControls)</m>
      <s>ActivateWindow(shutdownmenu)</s>
      <escape>PreviousMenu</escape>
      <key id="61952">parentdir</key>
      <i>Info</i>
      <menu>ContextMenu</menu>
      <c>ContextMenu</c>
      <space>Pause</space>
      <x>Stop</x>
      <period>SkipNext</period>
      <comma>SkipPrevious</comma>
      <tab>FullScreen</tab>
      <printscreen>Screenshot</printscreen>
      <s mod="ctrl">Screenshot</s>
      <minus>VolumeDown</minus>
      <plus>VolumeUp</plus>
      <equals>VolumeUp</equals>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>
      <numpadminus>VolumeDown</numpadminus>
      <numpadplus>VolumeUp</numpadplus>
      <numpadzero>Number0</numpadzero>
      <numpadone>Number1</numpadone>
      <numpadtwo>Number2</numpadtwo>
      <numpadthree>Number3</numpadthree>
      <numpadfour>Number4</numpadfour>
      <numpadfive>Number5</numpadfive>
      <numpadsix>Number6</numpadsix>
      <numpadseven>Number7</numpadseven>
      <numpadeight>Number8</numpadeight>
      <numpadnine>Number9</numpadnine>
      <backslash>ToggleFullScreen</backslash>
      <home>FirstPage</home>
      <end>LastPage</end>
      <!-- Multimedia keyboard keys -->
      <browser_back>Back</browser_back>
      <browser_forward></browser_forward>
      <browser_refresh></browser_refresh>
      <browser_stop></browser_stop>
      <browser_search></browser_search>
      <browser_favorites>ActivateWindow(Favourites)</browser_favorites>
      <browser_home>XBMC.ActivateWindow(Home)</browser_home>
      <volume_mute>Mute</volume_mute>
      <volume_down>VolumeDown</volume_down>
      <volume_up>VolumeUp</volume_up>
      <next_track>SkipNext</next_track>
      <prev_track>SkipPrevious</prev_track>
      <stop>Stop</stop>
      <play_pause>Pause</play_pause>
      <launch_mail></launch_mail>
      <launch_media_select>XBMC.ActivateWindow(MyMusic)</launch_media_select>
      <launch_app1_pc_icon>ActivateWindow(MyPrograms)</launch_app1_pc_icon>
      <launch_app2_pc_icon>ActivateWindow(MyPrograms)</launch_app2_pc_icon>
      <launch_file_browser></launch_file_browser>
      <launch_media_center></launch_media_center>
      <!-- ****************************************************** -->
      <!-- MS Media Center keyboard shortcuts sent by MCE remotes -->
      <!-- See http://msdn.microsoft.com/en-us/library/bb189249.aspx -->
      <p mod="ctrl,shift">Play</p>
      <!-- Play -->
      <s mod="ctrl,shift">Stop</s>
      <!-- Stop -->
      <p mod="ctrl">Pause</p>
      <!-- Pause -->
      <f mod="ctrl,shift">FastForward</f>
      <!-- Fwd -->
      <b mod="ctrl,shift">Rewind</b>
      <!-- Rew -->
      <f mod="ctrl">SkipNext</f>
      <!-- Skip -->
      <b mod="ctrl">SkipPrevious</b>
      <!-- Replay -->
      <d mod="ctrl">Info</d>
      <!-- MCE Details -->
      <f10>VolumeUp</f10>
      <!-- MCE Vol up -->
      <f9>VolumeDown</f9>
      <!-- MCE Vol down -->
      <f8>Mute</f8>
      <!-- MCE mute -->
      <g mod="ctrl">OSD</g>
      <!-- MCE Guide -->
      <m mod="ctrl">ActivateWindow(music)</m>
      <!-- MCE My music -->
      <i mod="ctrl">ActivateWindow(pictures)</i>
      <!-- MCE My pictures -->
      <e mod="ctrl">ActivateWindow(video)</e>
      <!-- MCE videos -->
      <m mod="ctrl,shift">PlayerControl(ShowVideoMenu)</m>
      <!-- MCE DVD menu -->
      <!-- MCE keypresses without an obvious use in XBMC -->
      <o mod="ctrl">Notification(MCEKeypress, Recorded TV, 3)</o>
      <t mod="ctrl">Notification(MCEKeypress, Live TV, 3)</t>
      <t mod="ctrl,shift">Notification(MCEKeypress, My TV, 3)</t>
      <a mod="ctrl">Notification(MCEKeypress, Radio, 3)</a>
      <u mod="ctrl">Notification(MCEKeypress, DVD subtitle, 3)</u>
      <a mod="ctrl,shift">Notification(MCEKeypress, DVD audio, 3)</a>
    </keyboard>
  </global>
  <loginscreen>
    <keyboard>
      <end>XBMC.ShutDown()</end>
    </keyboard>
  </loginscreen>
  <home>
    <keyboard>
      <i>info</i>
      <end>XBMC.ShutDown()</end>
    </keyboard>
  </home>
  <virtualkeyboard>
    <keyboard>
      <backspace>Backspace</backspace>
    </keyboard>
  </virtualkeyboard>
</keymap>
Reply
#12
(2013-04-22, 17:11)tprins228 Wrote: Here is my keyboard.xml. I used KeyMapEdit to adjust it. Keep in mind, THIS XML MAY NOT WORK FOR YOU!!!! I used debugging to find my specific keys and changed the xml accordingly.

That actually works really well. I added:
Code:
<MyVideoLibrary>
    <keyboard>
      <space>Playlist</space>
      <w>ToggleWatched</w>
      <backspace>Back</backspace>
      <delete>Back</delete>
    </keyboard>
  </MyVideoLibrary>

Seems there was another setting elsewhere that was changing Backspace back to Delete. Thanks for the code.

EDIT: By the way, this worked on Logitech K400, for anyone who is interested. Also, I realized after I posted, that the other child nodes need to have this included as well, since DEL and BACKSPACE seem to need this elsewhere. Amazing work tlprins.
Reply
#13
On quick check, it works with Aldi Bauhn S-KW427iBS and Microsoft Wireless Entertainment Keyboard 8000 when pairing to Galaxy Nexus running XBMC for Android 12.2. I would concur with other posters that this suggests there's a common issue with bluetooth keyboards and Android with XBMC.

Good work, tprins228!
Reply
#14
(2013-04-23, 07:05)JoeSzymkowicz Wrote:
(2013-04-22, 17:11)tprins228 Wrote: Here is my keyboard.xml. I used KeyMapEdit to adjust it. Keep in mind, THIS XML MAY NOT WORK FOR YOU!!!! I used debugging to find my specific keys and changed the xml accordingly.

That actually works really well. I added:
Code:
<MyVideoLibrary>
    <keyboard>
      <space>Playlist</space>
      <w>ToggleWatched</w>
      <backspace>Back</backspace>
      <delete>Back</delete>
    </keyboard>
  </MyVideoLibrary>

Seems there was another setting elsewhere that was changing Backspace back to Delete. Thanks for the code.

EDIT: By the way, this worked on Logitech K400, for anyone who is interested. Also, I realized after I posted, that the other child nodes need to have this included as well, since DEL and BACKSPACE seem to need this elsewhere. Amazing work tlprins.

ive had this problem with del and backspace.

has anyone managed to get the delete key to actually delete text in xbmc's onscreen keyboard situations?

joe, any chance you could cut and paste your keyboard.xml with all the child nodes done?

im not just being lazy, im not very confident in the keyboard.xml file.
Reply
#15
Quote:
has anyone managed to get the delete key to actually delete text in xbmc's onscreen keyboard situations?

Well I'm not sure about the others, but I haven't, and I don't think they have... I also can't seem to fix the shift keys, which really messes up the typing >_<.
Reply



Logout Mark Read Team Forum Stats Members Help
Not Sending Correct Keypresses (ESC, Backspace, Shift) on ODROID U21
This forum uses Lukasz Tkacz MyBB addons.