Help with keymap (shift, alt, ctrl modifiers)
I'm trying to get my remote to work with XBMC. It is a Fractal Design Shape.

I don't know why, but it sends regular keypresses to the receiver, so things like up/down/left/right and enter/back works as expected. Other buttons, such as the Play-button, sends Ctrl+Shift+P.

Therefore I would like to know if it's possible to map modifier keys along with regular keys in Keymap.xml? So I could get

ctrl+shift+p to execute the Play-command.

I'm wondering if this is possible as well. I haven't been able to find any information in the wiki or on the forums regarding this.
Ok, I found a solution to my problem, so I'll post it here in case anyone else wants to do this.

Follow the instructions on the wiki about advancedsettings and turn the loglevel on to 1 for debug loggings:

Now, start up XBMC and press the key combination you're trying to map (I'm using Ctrl+W here on a USA keyboard on Windows) a few times.

Close XBMC, and open up your xbmc.log file, and scroll to near the bottom. You should see something like this:
23:03:05 T:3824 M:1396764672   DEBUG: SDLKeyboard found something unknown (unicode <> printable ASCII): scancode: 56, sym: 308, unicode: 0, modifier: 0
23:03:05 T:3824 M:1396764672   DEBUG: CApplication::OnKey: 61555 pressed, action is 0

The important information here is the OnKey number (61555). This is the button ID which describes the key combination you pressed.

Now you can map this button ID to a function in your keymap.xml file as such:
      <key id="61555">XBMC.Quit</key>
Hmmm... good tip, but it's not working just right for me. I get a scancode (174 = stop button, for example) but it doesn't give me an OnKey number associated with it.
Hi everybody.

I also have some problems with these keymodifiers. My remote sends key combinations for nearly all its buttons. With the linux tool xev i recorded the DIFFERENT combinations including their hex-codes. but when i open the xbmc log file to get the button IDs, the ID is the SAME (65442) for almost all buttons.

I guess this ID is the same for every button on the remote which has a combination starting with Ctrl_L. Some remote buttons also create two OnKey events at the same time.

Any ideas how to fix that?
Hello! I also have the same issue! My remote is sending keyboard keystrokes for each command.

Did anyone of you succeed configuring your remotes?? Smile
I have the same issue. Wiimote, using cwiid rather than inputclient, so it's sending keystrokes.

Be nice to have the "B" button as a modifier (it's no use as a 'doing a thing' button as it's too easy to knock when putting remote down.) then can, I hope, do things like "B+Right = AnalogueFastForward", and, ultimately, "B + Roll_wiimote_right = AnalogFastForward", and so on.

Currently "B" sends LEFT_ALT. Great, combined with LEFT_CTRL (Button 2) and BACKSPACE (Button -) to restart X when xbmc crashes, as it does from time to time. Rebooting X fast easy way to trigger library update too. Certainly beats getting out a laptop and sshing into HTPC, especially for my housemates who aren't linuxy people.

So. xbmc.log's output for these keys is something like:

"B" (leftalt)
04:11:33 T:3050026896 M:1219567616   DEBUG: SDLKeyboard: scancode: 114, sym: 275, unicode: 0, modifier: 100

04:11:33 T:3050026896 M:1219567616   DEBUG: OnKey: 61479 pressed, action is 2

"B" + "right"
04:11:37 T:3050026896 M:1219518464   DEBUG: SDLKeyboard: scancode: 114, sym: 275, unicode: 0, modifier: 0
04:11:37 T:3050026896 M:1219518464   DEBUG: OnKey: 61479 pressed, action is 2

As you can see, B+right on the wiimote generates two events, the second of which is "right" and already mapped to an action in xbmc. Note I hit+hold B before pressing right.

Any ideas, anyone? I have tried searching, and reading the wiki, and this thread is the closest I've seen so far. Apologies if I've missed something glaringly obvious.

(also apologies for terseness, my RSI is playing up today, keyboard a bit painful to use)
I have the same issue: the scancodes are different, but the OnKey is either 65440 or 65442... Anybody knows where are the OnKey values calculated and what is the formula? I know some coding, so maybe I can help.
Also interested in this.
My remote sends Control_l and key commands...
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Help with keymap (shift, alt, ctrl modifiers)00