<!-- <obc45>Stop</obc45> -->
<!-- </universalremote> -->
-<!-- Note that the action can be a built-in function. -->
-<!-- eg <B>ActivateWindow(MyMusic)</B> -->
-<!-- would automatically go to My Music on the press of the B button. -->
+<!-- Note that the action can be a built-in function. -->
+<!-- eg <B>ActivateWindow(MyMusic)</B> -->
+<!-- would automatically go to My Music on the press of the B button. -->
+<!-- An empty action removes the corresponding mapping from the default keymap -->
<!-- Joysticks / Gamepads: -->
<!-- See the sample PS3 controller configuration below for the format. -->
<!-- <obc45>Stop</obc45> -->
<!-- </universalremote> -->
-<!-- Note that the action can be a built-in function. -->
-<!-- eg <B>ActivateWindow(MyMusic)</B> -->
-<!-- would automatically go to My Music on the press of the B button. -->
+<!-- Note that the action can be a built-in function. -->
+<!-- eg <B>ActivateWindow(MyMusic)</B> -->
+<!-- would automatically go to My Music on the press of the B button. -->
+<!-- An empty action removes the corresponding mapping from the default keymap -->
<!-- Joysticks / Gamepads: -->
<!-- See the sample PS3 controller configuration below for the format. -->
<!-- <obc45>Stop</obc45> -->
<!-- </universalremote> -->
-<!-- Note that the action can be a built-in function. -->
-<!-- eg <B>ActivateWindow(MyMusic)</B> -->
-<!-- would automatically go to My Music on the press of the B button. -->
+<!-- Note that the action can be a built-in function. -->
+<!-- eg <B>ActivateWindow(MyMusic)</B> -->
+<!-- would automatically go to My Music on the press of the B button. -->
+<!-- An empty action removes the corresponding mapping from the default keymap -->
<!-- Joysticks / Gamepads: -->
<!-- See the sample PS3 controller configuration below for the format. -->
else if (type == "appcommand")
buttonCode = TranslateAppCommand(pButton->Value());
- if (buttonCode && pButton->FirstChild())
- MapAction(buttonCode, pButton->FirstChild()->Value(), map);
+ if (buttonCode)
+ {
+ if (pButton->FirstChild() && pButton->FirstChild()->Value()[0])
+ MapAction(buttonCode, pButton->FirstChild()->Value(), map);
+ else
+ {
+ buttonMap::iterator it = map.find(buttonCode);
+ while (it != map.end())
+ {
+ map.erase(it);
+ it = map.find(buttonCode);
+ }
+ }
+ }
pButton = pButton->NextSiblingElement();
}