360 wireless Gamepad Eventghost profile
#1
I' m trying to setup Eventghost to use my 360 wireless pad to control XBMC (i'm almost there), without using keyboard or mouse emulation, so i can still use them on my primary monitor while XBMC is running on the secondary one.
I'm using the HID plugin of event ghost for the 360 pad events and the xbmc plugin for the gamepad and global actions.

Quote:EDIT & FIXED: "The first thing I found is that the EG/XBMC actions are not dipendent by the screen where xbmc is doing that action, for example the up/down/left/right cannot be mapped to skip back and forward while the osd is on or you cannot move trought the osd.
So i mapped the left and right button for the skipping (hold for >1 sec is big skip)"

All buttons emulate the same functions of original xbox pad, just the analog sticks aren't working for now
Start+"A" --> startup XBMC
Back+"B" --> quit XBMC
Right Thumb --> context menu.
Left/Right buttons --> skipprevious/skipnext
The volume is disabled becasue is causing some issues.

So here is my xml file and a modded version of the eventghost plugin that need to be replace, i hope somebody can help me improving it more.
http://www.mediafire.com/?sharekey=d3c24...b9a8902bda
or
http://www.2shared.com/file/4621765/e8fd...60pad.html

EDIT: Link updated to last version
Reply
#2
KoTiX Wrote:I' m trying to setup Eventghost to use my 360 wireless pad to control XBMC (i'm almost there), without using keyboard or mouse emulation, so i can still use them on my primary monitor while XBMC is running on the secondary one.

The first thing I found is that the EG/XBMC actions are not dipendent by the screen where xbmc is doing that action, for example the up/down/left/right cannot be mapped to skip back and forward while the osd is on or you cannot move trought the osd.
So i mapped the left and right button for the skipping (hold for >1 sec is big skip)

Start+"A" --> startup XBMC
Back+"B" --> quit XBMC
Right Thumb is for context menu.
The volume is disabled becasue is causing some issues.

So here is my xml file, i hope somebody can help me improving it more.

http://www.mediafire.com/?sharekey=0f0ed...b9a8902bda

I've got to admit, I've never used Eventghost before. Only xpadder. I was under the impression that Eventghost just mapped joystick commands to the keyboard or mouse...not that it actually sent player commands to XBMC. Interesting.

With Xpadder, I have the program configured to press "Y" on the keyboard for the "Y" button, "A" for "A", "B" for "B", etc. the left thumbstick controls the mouse, and the right thumbstick sends left/right/up/down arrow presses.
Select/start white/black are all mapped to other letters.

I then map all of these letters to specific sections in Keymap.xml, allowing the buttons to do different things in different areas.

Your buttons do the same command every time you press them no matter what. You need to change that. I'll play with eventghost and see if I can make a xbmc config section that works with my controller.
Reply
#3
digitalhigh Wrote:Your buttons do the same command every time you press them no matter what. You need to change that. I'll play with eventghost and see if I can make a xbmc config section that works with my controller.

I beleive that the problem is in the xbmc eventclient or in the evenghost plugin itself, there is no way to determinate if an event happen in a specific screen so I cannot specify different actions for the same button.
IMO the xbmc eventclient should take care of the discrimination of which action is possible to do in each screen.
Reply
#4
digitalhigh Wrote:I've got to admit, I've never used Eventghost before. Only xpadder. I was under the impression that Eventghost just mapped joystick commands to the keyboard or mouse...not that it actually sent player commands to XBMC. Interesting.

With Xpadder, I have the program configured to press "Y" on the keyboard for the "Y" button, "A" for "A", "B" for "B", etc. the left thumbstick controls the mouse, and the right thumbstick sends left/right/up/down arrow presses.
Select/start white/black are all mapped to other letters.

I then map all of these letters to specific sections in Keymap.xml, allowing the buttons to do different things in different areas.

Your buttons do the same command every time you press them no matter what. You need to change that. I'll play with eventghost and see if I can make a xbmc config section that works with my controller.
Could your share your xpadder config?
Reply
#5
Edit: Here is my xpadder profile.

http://www.mediafire.com/download.php?myneqyvhyjm

But after some more poking around in the Wiki, I realized that I've been looking at the problem all wrong. With the event server/client, you can map the actual button presses on the controller to be recognized as xbox buttonpresses in XBMC. It'll take me some playing around as I'm not at home, but I now understand how to solve both of our problems properly.

The eventghost buttonpresses are currently mapped to commands like "playfile", "fastforward", etc. They need to be mapped to "xbox button 1 down", or however it's referred to in the API. Now I just need to find the file that tells me what all the available events are...
Reply
#6
Could you share your keymap.xml file to? Thanks in advance
Reply
#7
Joslse Wrote:Could you share your keymap.xml file to? Thanks in advance

Keymap is included.

Eventghost is confusing the crap out of me. I don't know if XBMC has events defined for gamepad presses. If it did, then it wouldn't be too difficult to figure this out. I'm looking at the guts of the eventghost plugin, and I understand how to add new events...I just don't know if you can. I'm messing around with it now...
Reply
#8
digitalhigh Wrote:Now I just need to find the file that tells me what all the available events are...
I think you have a list of available events when you try to add one... What I found is that it does not support all of the actions available in http://wiki.xbmc.org/?title=Keymap.xml if I'm not mistaken.
Reply
#9
I'm starting to get it...the plugin for Eventghost already natively supports passing mapped Gamepad commands directly to XBMC via the PacketButton class.

Now I've got to figure how to implement this...

Quote:class PacketBUTTON (Packet):
"""A BUTTON packet

A button packet send a key press or release event to XBMC
"""
def __init__(self, code=0, repeat=1, down=1, queue=0,
map_name="", button_name="", amount=0, axis=0):
"""
Keyword arguments:
code -- raw button code (default: 0)
repeat -- this key press should repeat until released (default: 1)
Note that queued pressed cannot repeat.
down -- if this is 1, it implies a press event, 0 implies a release
event. (default: 1)
queue -- a queued key press means that the button event is
executed just once after which the next key press is
processed. It can be used for macros. Currently there
is no support for time delays between queued presses.
(default: 0)
map_name -- a combination of map_name and button_name refers to a
mapping in the user's Keymap.xml or Lircmap.xml.
map_name can be one of the following:
"KB" => standard keyboard map ( <keyboard> section )
"XG" => xbox gamepad map ( <gamepad> section )
"R1" => xbox remote map ( <remote> section )
"R2" => xbox universal remote map ( <universalremote>
section )
"LI:devicename" => LIRC remote map where 'devicename' is the
actual device's name
button_name -- a button name defined in the map specified in map_name.
For example, if map_name is "KB" refering to the
<keyboard> section in Keymap.xml then, valid
button_names include "printscreen", "minus", "x", etc.
amount -- unimplemented for now; in the future it will be used for
specifying magnitude of analog key press events
Reply
#10
I'm not good with python, but here http://www.eventghost.org/forum/viewtopi...a&start=45 in the " Myxin" post you can see how he tryed to remap the remote keys.
I replaced that part in the __init__.py and i have different actions now in eventghost, but I just reproduced what Myxin say: "it seems to be that XBMC has some problems with events that are sended by the function send_remote_button.Each event by this function is repeated unlimited in XBMC. I can close EG and XBMC continues repeating the last key."
I don't know if you are able to fix that and to remap it to the gamepad instead...
Reply
#11
KoTiX Wrote:I'm not good with python, but here http://www.eventghost.org/forum/viewtopi...a&start=45 in the " Myxin" post you can see how he tryed to remap the remote keys.
I replaced that part in the __init__.py and i have different actions now in eventghost, but there is something wrong anyway.
I don't know if you are able to fix that and to remap it to the gamepad instead...

It's definitely something to do with this command:

Code:
self.plugin.xbmc.send_action(self.value,actiontype=ACTION_BUTTON)

They discuss on the EG forums about mapping buttons directly to the definitions in keymap.xml. I posted there asking for specifics on how to use this. Hopefully I get an answer today...
Reply
#12
Tnx man in advance Smile
Reply
#13
KoTiX Wrote:Tnx man in advance Smile

You're welcome, although honestly, I'm doing this for myself more than anything. I've been trying to find a way to get EXACT xb1 controller support going since I made the switch to windows. I've asked several places about how to edit the keymap.xml...never realizing that eventghost talks directly to XBMC. I thought eventghost was a macroized version of Xpadder or something. Once I realized how EG actually worked, I felt like a huge dumbass because I'd been asking the wrong questions the whole time.

My end goal here is to make a config file that works equally well for the 360 and xb1 controller, including analogue support for triggers and thumbsticks.
Reply
#14
I found it!!! The solution is always at first page Tongue
Just use this older version of the EG plugin: http://www.eventghost.org/forum/download...php?id=363 and it will send the remote keys instead of the xbmc actions.
The autor(kirs) firstly made it in this way and he modified it later to use the actions, it's not buggy like the Myxin code so you can use it as a good starting point Tongue
Reply
#15
Yes, that's very very similar to what I came up with. I want to do the same thing with the send_button(self, map="", button="", amount=0) command. I just don't know how define the variables in the list to use buttonnames instead of action commands or remote codes...
Reply

Logout Mark Read Team Forum Stats Members Help
360 wireless Gamepad Eventghost profile0