From 33dcf6078934d43ab2dc02eb32effb3066264e5d Mon Sep 17 00:00:00 2001
From: Ingo Ruhnke <grumbel@gmx.de>
Date: Wed, 26 May 2010 20:45:52 +0200
Subject: [PATCH] Added keyboard combinations to --ui-axismap

---
 src/axis_event.cpp | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/axis_event.cpp b/src/axis_event.cpp
index 9801c08..bff5cff 100644
--- a/src/axis_event.cpp
+++ b/src/axis_event.cpp
@@ -211,11 +211,27 @@ AxisEvent::key_from_string(const std::string& str)
     switch(j)
     {
       case 0:
-        ev.key.up_codes[0] = str2key_event(*i);
+        {
+          boost::char_separator<char> plus_sep("+", "", boost::keep_empty_tokens);
+          tokenizer ev_tokens(*i, plus_sep);
+          int k = 0;
+          for(tokenizer::iterator m = ev_tokens.begin(); m != ev_tokens.end(); ++m, ++k)
+          {
+            ev.key.up_codes[k] = str2key_event(*m);
+          }         
+        }
         break;
 
       case 1:
-        ev.key.down_codes[0] = str2key_event(*i);
+        {
+          boost::char_separator<char> plus_sep("+", "", boost::keep_empty_tokens);
+          tokenizer ev_tokens(*i, plus_sep);
+          int k = 0;
+          for(tokenizer::iterator m = ev_tokens.begin(); m != ev_tokens.end(); ++m, ++k)
+          {
+            ev.key.down_codes[k] = str2key_event(*m);
+          }         
+        }
         break;
 
       case 2: