Adding few missed keyboard codes.
#1
I've recently bought cheap noname PC remote and at last could try to control XBMC with remote. This one is HID one, as lot of modern remotes are (for example iMON series, GoTView, MCE remotes, etc.) so it sends keypresses as if it is multimedia keyboard. It works fine with XBMC but sad thing I could not get 5 keys to work since XBMS doesn't understand some of keyboard codes - for example lot of multimedia keyboards have key "E-Mail" but XBMC cannot generate VKey for it. So I've added 4 missed codes to sources and wanted to add SLEEP one (XF86Sleep in XOrg) too but could not "invent" VKey for it. Smile Also I've added few more text representations into CButtonTranslator::TranslateKeyboardString() function for human-readable look in keyboard.xml file. Would be glad if someone could merge it into SVN. I haven't added anything into system/keymaps/keyboard.xml so may be it would be good to add empty bindings there too?
Code:
--- xbmc-9.11.orig/xbmc/KeyboardStat.cpp
+++ xbmc-9.11/xbmc/KeyboardStat.cpp
@@ -72,6 +72,10 @@
, { 135, 0x5d } // Right click
, { 136, 0xb2 } // Stop
, { 138, 0x49 } // Info
+//, { 150, 0x } // Sleep
+, { 152, 0xb8 } // Launch file browser
+, { 163, 0xb4 } // Launch Mail
+, { 164, 0xab } // Browser favorites
, { 166, 0xa6 } // Browser back
, { 167, 0xa7 } // Browser forward
, { 171, 0xb0 } // Next track
@@ -79,6 +83,7 @@
, { 173, 0xb1 } // Prev track
, { 174, 0xb2 } // Stop
, { 176, 0x52 } // Rewind
+, { 179, 0xb9 } // Launch media center
, { 180, 0xac } // Browser home
, { 181, 0xa8 } // Browser refresh
, { 214, 0x1B } // Close
--- xbmc-9.11.orig/xbmc/ButtonTranslator.cpp
+++ xbmc-9.11/xbmc/ButtonTranslator.cpp
@@ -1157,8 +1157,12 @@
     else if (strKey.Equals("browser_favorites")) buttonCode = 0xF0AB;
     else if (strKey.Equals("browser_refresh")) buttonCode = 0xF0A8;
     else if (strKey.Equals("browser_search")) buttonCode = 0xF0AA;
+    else if (strKey.Equals("browser_back")) buttonCode = 0xF0A6;
+    else if (strKey.Equals("browser_forward")) buttonCode = 0xF0A7;
     else if (strKey.Equals("launch_app1_pc_icon")) buttonCode = 0xF0B6;
     else if (strKey.Equals("launch_media_select")) buttonCode = 0xF0B5;
+    else if (strKey.Equals("launch_explorer")) buttonCode = 0xF0B8;
+    else if (strKey.Equals("launch_media_center")) buttonCode = 0xF0B9;
     else if (strKey.Equals("play_pause")) buttonCode = 0xF0B3;
     else if (strKey.Equals("stop")) buttonCode = 0xF0B2;
     else if (strKey.Equals("volume_up")) buttonCode = 0xF0AF;
Reply
#2
trac it please. trac.xbmc.org. also no addition of new commented lines.
Reply
#3
spiff Wrote:trac it please. trac.xbmc.org. also no addition of new commented lines.
OK, thank you, I'll go there right now. Could you tell me how I can find unused VKey code to bind onto SLEEP key so I can add it instead of commented line?
Reply
#4
add a printf, press the key, see what you get returned.
Reply
#5
spiff Wrote:add a printf, press the key, see what you get returned.
The key does not generate character output, it generates scancode 150 (0x96). As far as I can see, VKey 0x9f (that will generate id=61599) isn't used anywhere, I'll use it then, is it OK?
Reply
#6
i don't see a problem as long as it's not used.
Reply
#7
I've posted the patch some days ago (http://trac.xbmc.org/ticket/9058). How long would it take to add that into SVN trunk?
Reply
#8
Probably should have posted the link right away. We don't always keep track of the changes in trac
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Adding few missed keyboard codes.0