Keymap XBMC

Skynet

Administrator
Here is a keymap xml for the A2 & A2 Lite that fixes the back button taking you back to the home screen instead of just one folder up.
You need to copy it to your keymaps folder in:
Android/data/hk.minix.xbmc/files/.xbmc/userdata/keymaps
Reboot XBMC and you should now be able to browse normally.

Link
 
Thanks. I lost the file downloaded from the old forum and was looking for it. I am using the remote on a Zidoo and it the need the fix too
 
Here is a keymap xml for the A2 & A2 Lite that fixes the back button taking you back to the home screen instead of just one folder up.
You need to copy it to your keymaps folder in:
Android/data/hk.minix.xbmc/files/.xbmc/userdata/keymaps
Reboot XBMC and you should now be able to browse normally.

Link
I use my a2 lite in kodi this way:
- back button press takes me to home screen
-if i press back button for a few seconds (long press) takes me one folder up.

Is good to know that fix. If i need and i think it is better i will copy that.
W2 remote control works in the same way as a2 lite (back button).

Thank you ☺
 
Here is a keymap xml for the A2 & A2 Lite that fixes the back button taking you back to the home screen instead of just one folder up.
You need to copy it to your keymaps folder in:
Android/data/hk.minix.xbmc/files/.xbmc/userdata/keymaps
Reboot XBMC and you should now be able to browse normally.

Link

Forgot to post when I grabbed this file a while ago myself, (better late than never). Very useful mate :).

I'm more familiar with the A3's than the A2/A2 Lite. More recently have been using an A2 Lite for beta testing the U9-H CE ROM & Kodi had this exact issue of the back button jumping right back to the home screen. Dropped this XML file in & problem instantly solved without having to mess around mapping the key myself lol ;).

Many thanks :).
 
W2 remote mouse right click button (in windows) and A2 lite remote back button (android) works very nice (takes me one folder up) , i already tested :)
 
I also use a mix of Neo W2, A2 Lite & A3's.

I'm so used to the A's that I'm forever mixing up the pointer buttons when using the W2 & closing my Win programs by mistake lol ;).

DOH!!
 
Thank you for this. I had to flash my minix and forgot to save this keymap.

But I used to have one with some more tweaks.
For example: when I hit the back button, I want the video to also stop playing.

It is years ago when I played with this type of tweaking and honestly... I forgot how I did it.

Does anyone still has the more extensive keymap?
 
yes, I came back to let you know that the Addon is super easy. Never used it before. Worked perfectly.

But I was too slow for you haha

Thanks though!
 
I finally found my post from the old forum about the a2 lite and keymaps on archive.org so I'm going to copy and paste it here.

A2 Lite Button Remapping info for xbmc/kodi on Android boxes.
Discussion in 'NEO A2 Lite' started by augur, Dec 20, 2016.

I received my Minix U1 and Neo A2 Lite a couple of days ago and I had a devil of a time pulling together all the information for remapping the keys to work with the included xbmc for Minix. And it wasn't because I'm unfamiliar with Android, or Kodi, or even keymapping. It was because some of the critical information isn't posted anywhere here and other important information is spread about in various threads with lots of posts making it hard to find.

As such I thought I'd post the really important bits here in one place.

This is the Neo A2 Lite, it looks like the Neo A2 but it isn't. The keycodes of the Neo A2 Lite are different to those of the Neo A2. When referencing buttons I will be using the Number and Name in the manual
use the pdf manual posted here

When running xbmc for Minix it is running on an Android Box. The Android OS blocks modification of some buttons so they cannot be reassigned (you might be able to if you root your box but we'll assume most users don't want to have to do that).
The buttons that can't be reassigned under Android are
(1) Power
(2) Mute
(3) Recent apps list
(5) Launcher Home screen
(8) Enter
(10) Activation Key
(11) Volume Down
(12) Volume Up
(13) List of apps installed

That leaves the following buttons along with their keycodes.

Code:
(4) Menu key id='61656'
(6)a Up key id='61568'
(6)b Down key id='61569'
(6)c Left key id='61570'
(6)d Right key id='61571'
(7) Enter key id='61453'
(9) Return/Back key id='61467'
(14) Fast Forward key id='61637'
(15) Rewind key id='61636'

If you are using the Neo A2 Lite on a raspberry pi, linux, or windows box you have access to all buttons and can reassign most if not all of them and reference them by their key name instead of their key id. That's seems to be a big part of the confusion with xbmc for minix users trying to remap the (2) Menu button with F2 when they should be using <key id='61656'>Menu</key>.
For a list of the buttons key names they seem to be identical to the Neo A2 which you can find on the kodi wiki.
fyi the Keycodes on that page are in hex, they would need to be converted to decimal for use in a keymapping xml file, if you had a Neo A2 remote.

When working with Keymapping xml files there are a few things it helps to understand.
The keymaps folder is located at
Android/data/hk.minix.xbmc/files/.xbmc/userdata/keymaps
From within kodi it is simply /userdata/keymaps

If you use the Keymap Editor it saves the keymapping in a file called gen.xml
If you then add another keymap file called keymap.xml xbmc will load both of them in alphabetical order and anything in keymap.xml which matches an edit in gen.xml will overwrite the gen.xml mapping.

The keymapping xml structure is fairly simple, but it can get complicated quickly.
As a visual guide the following keymap is used by most Neo A2 and Neo A2 Lite to fix the back button so it doesn't take you back to the home screen should be familiar. It also incorporate the modification so pressing the (9) Back button when a video is playing full screen Stops the video instead of going to the previous screen.


Code:
to fix the back button
<keymap>
<global>
<keyboard>
<backspace>Back</backspace>
<key id='61467'>Back</key>
</keyboard>
</global>
<FullscreenVideo>
<keyboard>
<backspace>Stop</backspace>
<key id='61467'>Stop</key>
</keyboard>
</FullscreenVideo>
</keymap>


xml files have a heirarchical structure and can be thought of like
a branching tree. At the top level is the <keymap></keymap>
everything goes between these two elements or it is ignored.

At the next level are all the screens within xbmc, however the first
element is for global mappings which apply on all screens. Within xbmc
you can override a global mapping by adding a window specific mapping.

In this case the global mapping for the (9) Back button, which has a key
id='61467', is set to perform a Back command when pressed. However,
when a FullscreenVideo is playing that same button/key id is set to
perform the Stop command. Once you understand that the same button can
perform different tasks on different Windows you start to grasp just how
powerful keymapping can be, and how easy it is to get something wrong
and stop it working. FYI the <backspace> is the reverse sides
keyboard backspace.


I will now post my personnal keymapping.xml file and explain it

Code:
<keymap>
<global>
<keyboard>
<backspace>Back</backspace>
<key id='61467'>Back</key>
<key id='61637'>pagedown</key>
<key id='61636'>pageup</key>
</keyboard>
</global>
<home>
<keyboard>
<key id='61656'>ActivateWindow(Favourites)</key>
</keyboard>
</home>
<FullscreenVideo>
<keyboard>
<backspace>Stop</backspace>
<key id='61467'>Stop</key>
<key id='61636'>rewind</key>
<key id='61637'>fastforward</key>
<key id='61656'>ShowSubtitles</key>
</keyboard>
</FullscreenVideo>
<VideoOSD>
<keyboard>
<key id='61656'>CodecInfo</key>
</keyboard>
</VideoOSD>
</keymap>

Globally the (9) Back is set to perform the Back command, the (14) Fast Forward is set to do a Page Down, and the (15) rewind is set to do a Page Up. This applies to every single window in xbmc, unless overwritten by a window specific mapping.

I have a number of playlists added to the favourites window so I wanted a way to open this easily so on the <home> window the (4) Menu key id='61656' opens the favourites window.

When playing a video fullscreen it is the FullscreenVideo window. The (9) Back is overwritten from the global Back and instead performs Stop. And also the (14) Fast Forward and (15) Rewind global mapping of Page Down / Page Up are overwritten back to the default Fastforward and Rewind. I have also added a window specific mapping for the (4) Menu button so it toggles the subtitles.

Lastly if you press the (7) Enter button whilst a video is playing you bring up the On Screen Display, this is the VideoOSD window. If you press the (4) Menu whilst this window is open it toggles CodecInfo with all those nice statistics.
 
Thank you for sharing with us ☺.
I am using part of that code, that fixes the back button (post 1 by @Skynet).
It is indeed very useful ☺
 
Back
Top