浏览代码

Added Left and Right versions of modifier keys to ActionMap bindings.

capnlove 9 年之前
父节点
当前提交
77cb87bf01
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      engine/source/input/actionMap.cc

+ 16 - 0
engine/source/input/actionMap.cc

@@ -310,14 +310,30 @@ bool ActionMap::createEventDescriptor(const char* pEventString, EventDescriptor*
       while (pModifier != NULL) {
       while (pModifier != NULL) {
          if (dStricmp(pModifier, "shift") == 0) {
          if (dStricmp(pModifier, "shift") == 0) {
             pDescriptor->flags |= SI_SHIFT;
             pDescriptor->flags |= SI_SHIFT;
+         } else if (dStricmp(pModifier, "lshift") == 0) {
+            pDescriptor->flags |= SI_LSHIFT;
+         } else if (dStricmp(pModifier, "rshift") == 0) {
+            pDescriptor->flags |= SI_RSHIFT;
          } else if (dStricmp(pModifier, "ctrl") == 0) {
          } else if (dStricmp(pModifier, "ctrl") == 0) {
             pDescriptor->flags |= SI_CTRL;
             pDescriptor->flags |= SI_CTRL;
+         } else if (dStricmp(pModifier, "lctrl") == 0) {
+            pDescriptor->flags |= SI_LCTRL;
+         } else if (dStricmp(pModifier, "rctrl") == 0) {
+            pDescriptor->flags |= SI_RCTRL;
          } else if (dStricmp(pModifier, "alt") == 0) {
          } else if (dStricmp(pModifier, "alt") == 0) {
             pDescriptor->flags |= SI_ALT;
             pDescriptor->flags |= SI_ALT;
+         } else if (dStricmp(pModifier, "lalt") == 0) {
+            pDescriptor->flags |= SI_LALT;
+         } else if (dStricmp(pModifier, "ralt") == 0) {
+            pDescriptor->flags |= SI_RALT;
          } else if (dStricmp(pModifier, "cmd") == 0) {
          } else if (dStricmp(pModifier, "cmd") == 0) {
             pDescriptor->flags |= SI_ALT;
             pDescriptor->flags |= SI_ALT;
          } else if (dStricmp(pModifier, "opt") == 0) {
          } else if (dStricmp(pModifier, "opt") == 0) {
             pDescriptor->flags |= SI_MAC_OPT;
             pDescriptor->flags |= SI_MAC_OPT;
+         } else if (dStricmp(pModifier, "lopt") == 0) {
+            pDescriptor->flags |= SI_MAC_LOPT;
+         } else if (dStricmp(pModifier, "ropt") == 0) {
+            pDescriptor->flags |= SI_MAC_ROPT;
          }
          }
 
 
          pModifier = dStrtok(NULL, "-");
          pModifier = dStrtok(NULL, "-");