Browse Source

Regex replace all the uppercase key bindings with their constants.

Yao Wei Tjong 姚伟忠 9 years ago
parent
commit
1243d8bcda

+ 2 - 2
Source/Samples/09_MultipleViewports/MultipleViewports.cpp

@@ -258,9 +258,9 @@ void MultipleViewports::MoveCamera(float timeStep)
 
 
     // Toggle post processing effects on the front viewport. Note that the rear viewport is unaffected
     // Toggle post processing effects on the front viewport. Note that the rear viewport is unaffected
     RenderPath* effectRenderPath = GetSubsystem<Renderer>()->GetViewport(0)->GetRenderPath();
     RenderPath* effectRenderPath = GetSubsystem<Renderer>()->GetViewport(0)->GetRenderPath();
-    if (input->GetKeyPress('B'))
+    if (input->GetKeyPress(KEY_B))
         effectRenderPath->ToggleEnabled("Bloom");
         effectRenderPath->ToggleEnabled("Bloom");
-    if (input->GetKeyPress('F'))
+    if (input->GetKeyPress(KEY_F))
         effectRenderPath->ToggleEnabled("FXAA2");
         effectRenderPath->ToggleEnabled("FXAA2");
 
 
     // Toggle debug geometry with space
     // Toggle debug geometry with space

+ 1 - 1
Source/Samples/15_Navigation/Navigation.cpp

@@ -259,7 +259,7 @@ void Navigation::MoveCamera(float timeStep)
     if (input->GetMouseButtonPress(MOUSEB_LEFT))
     if (input->GetMouseButtonPress(MOUSEB_LEFT))
         SetPathPoint();
         SetPathPoint();
     // Add or remove objects with middle mouse button, then rebuild navigation mesh partially
     // Add or remove objects with middle mouse button, then rebuild navigation mesh partially
-    if (input->GetMouseButtonPress(MOUSEB_MIDDLE) || input->GetKeyPress('O'))
+    if (input->GetMouseButtonPress(MOUSEB_MIDDLE) || input->GetKeyPress(KEY_O))
         AddOrRemoveObject();
         AddOrRemoveObject();
 
 
     // Toggle debug geometry with space
     // Toggle debug geometry with space

+ 2 - 2
Source/Samples/18_CharacterDemo/CharacterDemo.cpp

@@ -310,11 +310,11 @@ void CharacterDemo::HandleUpdate(StringHash eventType, VariantMap& eventData)
             character_->GetNode()->SetRotation(Quaternion(character_->controls_.yaw_, Vector3::UP));
             character_->GetNode()->SetRotation(Quaternion(character_->controls_.yaw_, Vector3::UP));
 
 
             // Switch between 1st and 3rd person
             // Switch between 1st and 3rd person
-            if (input->GetKeyPress('F'))
+            if (input->GetKeyPress(KEY_F))
                 firstPerson_ = !firstPerson_;
                 firstPerson_ = !firstPerson_;
 
 
             // Turn on/off gyroscope on mobile platform
             // Turn on/off gyroscope on mobile platform
-            if (touch_ && input->GetKeyPress('G'))
+            if (touch_ && input->GetKeyPress(KEY_G))
                 touch_->useGyroscope_ = !touch_->useGyroscope_;
                 touch_->useGyroscope_ = !touch_->useGyroscope_;
 
 
             // Check for loading / saving the scene
             // Check for loading / saving the scene

+ 1 - 1
Source/Samples/20_HugeObjectCount/HugeObjectCount.cpp

@@ -256,7 +256,7 @@ void HugeObjectCount::HandleUpdate(StringHash eventType, VariantMap& eventData)
         animate_ = !animate_;
         animate_ = !animate_;
 
 
     // Toggle grouped / ungrouped mode
     // Toggle grouped / ungrouped mode
-    if (input->GetKeyPress('G'))
+    if (input->GetKeyPress(KEY_G))
     {
     {
         useGroups_ = !useGroups_;
         useGroups_ = !useGroups_;
         CreateScene();
         CreateScene();

+ 1 - 1
Source/Samples/39_CrowdNavigation/CrowdNavigation.cpp

@@ -446,7 +446,7 @@ void CrowdNavigation::MoveCamera(float timeStep)
     if (input->GetMouseButtonPress(MOUSEB_LEFT))
     if (input->GetMouseButtonPress(MOUSEB_LEFT))
         SetPathPoint(input->GetQualifierDown(QUAL_SHIFT));
         SetPathPoint(input->GetQualifierDown(QUAL_SHIFT));
     // Add new obstacle or remove existing obstacle/agent with middle mouse button
     // Add new obstacle or remove existing obstacle/agent with middle mouse button
-    else if (input->GetMouseButtonPress(MOUSEB_MIDDLE) || input->GetKeyPress('O'))
+    else if (input->GetMouseButtonPress(MOUSEB_MIDDLE) || input->GetKeyPress(KEY_O))
         AddOrRemoveObject();
         AddOrRemoveObject();
 
 
     // Check for loading/saving the scene from/to the file Data/Scenes/CrowdNavigation.xml relative to the executable directory
     // Check for loading/saving the scene from/to the file Data/Scenes/CrowdNavigation.xml relative to the executable directory

+ 1 - 1
Source/Urho3D/Input/Input.cpp

@@ -2461,7 +2461,7 @@ void Input::HandleScreenJoystickTouch(StringHash eventType, VariantMap& eventDat
         }
         }
         else
         else
         {
         {
-            // Hat is binded by 4 integers representing keysyms for 'W', 'S', 'A', 'D' or something similar
+            // Hat is binded by 4 integers representing keysyms for 'w', 's', 'a', 'd' or something similar
             IntRect keyBinding = keyBindingVar.GetIntRect();
             IntRect keyBinding = keyBindingVar.GetIntRect();
 
 
             if (eventType == E_TOUCHEND)
             if (eventType == E_TOUCHEND)

+ 4 - 4
Source/Urho3D/UI/LineEdit.cpp

@@ -211,8 +211,8 @@ void LineEdit::OnKey(int key, int buttons, int qualifiers)
 
 
     switch (key)
     switch (key)
     {
     {
-    case 'X':
-    case 'C':
+    case KEY_X:
+    case KEY_C:
         if (textCopyable_ && qualifiers & QUAL_CTRL)
         if (textCopyable_ && qualifiers & QUAL_CTRL)
         {
         {
             unsigned start = text_->GetSelectionStart();
             unsigned start = text_->GetSelectionStart();
@@ -221,7 +221,7 @@ void LineEdit::OnKey(int key, int buttons, int qualifiers)
             if (text_->GetSelectionLength())
             if (text_->GetSelectionLength())
                 GetSubsystem<UI>()->SetClipboardText(line_.SubstringUTF8(start, length));
                 GetSubsystem<UI>()->SetClipboardText(line_.SubstringUTF8(start, length));
 
 
-            if (key == 'X' && editable_)
+            if (key == KEY_X && editable_)
             {
             {
                 if (start + length < line_.LengthUTF8())
                 if (start + length < line_.LengthUTF8())
                     line_ = line_.SubstringUTF8(0, start) + line_.SubstringUTF8(start + length);
                     line_ = line_.SubstringUTF8(0, start) + line_.SubstringUTF8(start + length);
@@ -234,7 +234,7 @@ void LineEdit::OnKey(int key, int buttons, int qualifiers)
         }
         }
         break;
         break;
 
 
-    case 'V':
+    case KEY_V:
         if (editable_ && textCopyable_ && qualifiers & QUAL_CTRL)
         if (editable_ && textCopyable_ && qualifiers & QUAL_CTRL)
         {
         {
             const String& clipBoard = GetSubsystem<UI>()->GetClipboardText();
             const String& clipBoard = GetSubsystem<UI>()->GetClipboardText();

+ 2 - 2
bin/Data/Scripts/09_MultipleViewports.as

@@ -202,9 +202,9 @@ void MoveCamera(float timeStep)
 
 
     // Toggle post processing effects on the front viewport. Note that the rear viewport is unaffected
     // Toggle post processing effects on the front viewport. Note that the rear viewport is unaffected
     RenderPath@ effectRenderPath = renderer.viewports[0].renderPath;
     RenderPath@ effectRenderPath = renderer.viewports[0].renderPath;
-    if (input.keyPress['B'])
+    if (input.keyPress[KEY_B])
         effectRenderPath.ToggleEnabled("Bloom");
         effectRenderPath.ToggleEnabled("Bloom");
-    if (input.keyPress['F'])
+    if (input.keyPress[KEY_F])
         effectRenderPath.ToggleEnabled("FXAA2");
         effectRenderPath.ToggleEnabled("FXAA2");
 
 
     // Toggle debug geometry with space
     // Toggle debug geometry with space

+ 1 - 1
bin/Data/Scripts/15_Navigation.as

@@ -215,7 +215,7 @@ void MoveCamera(float timeStep)
     if (input.mouseButtonPress[MOUSEB_LEFT])
     if (input.mouseButtonPress[MOUSEB_LEFT])
         SetPathPoint();
         SetPathPoint();
     // Add or remove objects with middle mouse button, then rebuild navigation mesh partially
     // Add or remove objects with middle mouse button, then rebuild navigation mesh partially
-    if (input.mouseButtonPress[MOUSEB_MIDDLE] || input.keyPress['O'])
+    if (input.mouseButtonPress[MOUSEB_MIDDLE] || input.keyPress[KEY_O])
         AddOrRemoveObject();
         AddOrRemoveObject();
 
 
     // Toggle debug geometry with space
     // Toggle debug geometry with space

+ 2 - 2
bin/Data/Scripts/18_CharacterDemo.as

@@ -259,11 +259,11 @@ void HandleUpdate(StringHash eventType, VariantMap& eventData)
         characterNode.rotation = Quaternion(character.controls.yaw, Vector3(0.0f, 1.0f, 0.0f));
         characterNode.rotation = Quaternion(character.controls.yaw, Vector3(0.0f, 1.0f, 0.0f));
 
 
         // Switch between 1st and 3rd person
         // Switch between 1st and 3rd person
-        if (input.keyPress['F'])
+        if (input.keyPress[KEY_F])
             firstPerson = !firstPerson;
             firstPerson = !firstPerson;
 
 
         // Turn on/off gyroscope on mobile platform
         // Turn on/off gyroscope on mobile platform
-        if (input.keyPress['G'])
+        if (input.keyPress[KEY_G])
             useGyroscope = !useGyroscope;
             useGyroscope = !useGyroscope;
 
 
         // Check for loading / saving the scene
         // Check for loading / saving the scene

+ 1 - 1
bin/Data/Scripts/20_HugeObjectCount.as

@@ -201,7 +201,7 @@ void HandleUpdate(StringHash eventType, VariantMap& eventData)
         animate = !animate;
         animate = !animate;
 
 
     // Toggle grouped / ungrouped mode
     // Toggle grouped / ungrouped mode
-    if (input.keyPress['G'])
+    if (input.keyPress[KEY_G])
     {
     {
         useGroups = !useGroups;
         useGroups = !useGroups;
         CreateScene();
         CreateScene();

+ 1 - 1
bin/Data/Scripts/39_CrowdNavigation.as

@@ -387,7 +387,7 @@ void MoveCamera(float timeStep)
     if (input.mouseButtonPress[MOUSEB_LEFT])
     if (input.mouseButtonPress[MOUSEB_LEFT])
         SetPathPoint(input.qualifierDown[QUAL_SHIFT]);
         SetPathPoint(input.qualifierDown[QUAL_SHIFT]);
     // Add new obstacle or remove existing obstacle/agent with middle mouse button
     // Add new obstacle or remove existing obstacle/agent with middle mouse button
-    else if (input.mouseButtonPress[MOUSEB_MIDDLE] || input.keyPress['O'])
+    else if (input.mouseButtonPress[MOUSEB_MIDDLE] || input.keyPress[KEY_O])
         AddOrRemoveObject();
         AddOrRemoveObject();
 
 
     // Check for loading/saving the scene from/to the file Data/Scenes/CrowdNavigation.xml relative to the executable directory
     // Check for loading/saving the scene from/to the file Data/Scenes/CrowdNavigation.xml relative to the executable directory

+ 40 - 40
bin/Data/Scripts/Editor/EditorUI.as

@@ -318,10 +318,10 @@ void CreateMenuBar()
     {
     {
         Menu@ menu = CreateMenu("File");
         Menu@ menu = CreateMenu("File");
         Window@ popup = menu.popup;
         Window@ popup = menu.popup;
-        popup.AddChild(CreateMenuItem("New scene", @ResetScene, 'N', QUAL_SHIFT | QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Open scene...", @PickFile, 'O', QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Save scene", @SaveSceneWithExistingName, 'S', QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Save scene as...", @PickFile, 'S', QUAL_SHIFT | QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("New scene", @ResetScene, KEY_N, QUAL_SHIFT | QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Open scene...", @PickFile, KEY_O, QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Save scene", @SaveSceneWithExistingName, KEY_S, QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Save scene as...", @PickFile, KEY_S, QUAL_SHIFT | QUAL_CTRL));
         recentSceneMenu = CreateMenuItem("Open recent scene", null, SHOW_POPUP_INDICATOR);
         recentSceneMenu = CreateMenuItem("Open recent scene", null, SHOW_POPUP_INDICATOR);
         popup.AddChild(recentSceneMenu);
         popup.AddChild(recentSceneMenu);
         mruScenesPopup = CreatePopup(recentSceneMenu);
         mruScenesPopup = CreatePopup(recentSceneMenu);
@@ -354,26 +354,26 @@ void CreateMenuBar()
     {
     {
         Menu@ menu = CreateMenu("Edit");
         Menu@ menu = CreateMenu("Edit");
         Window@ popup = menu.popup;
         Window@ popup = menu.popup;
-        popup.AddChild(CreateMenuItem("Undo", @Undo, 'Z', QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Redo", @Redo, 'Y', QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Undo", @Undo, KEY_Z, QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Redo", @Redo, KEY_Y, QUAL_CTRL));
         CreateChildDivider(popup);
         CreateChildDivider(popup);
-        popup.AddChild(CreateMenuItem("Cut", @Cut, 'X', QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Cut", @Cut, KEY_X, QUAL_CTRL));
 
 
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
-            popup.AddChild(CreateMenuItem("Duplicate", @Duplicate, 'D', QUAL_CTRL));
+            popup.AddChild(CreateMenuItem("Duplicate", @Duplicate, KEY_D, QUAL_CTRL));
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
-            popup.AddChild(CreateMenuItem("Duplicate", @Duplicate, 'D', QUAL_SHIFT));
+            popup.AddChild(CreateMenuItem("Duplicate", @Duplicate, KEY_D, QUAL_SHIFT));
 
 
-        popup.AddChild(CreateMenuItem("Copy", @Copy, 'C', QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Paste", @Paste, 'V', QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Copy", @Copy, KEY_C, QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Paste", @Paste, KEY_V, QUAL_CTRL));
 
 
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
             popup.AddChild(CreateMenuItem("Delete", @Delete, KEY_DELETE, QUAL_ANY));
             popup.AddChild(CreateMenuItem("Delete", @Delete, KEY_DELETE, QUAL_ANY));
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
-            popup.AddChild(CreateMenuItem("Delete", @BlenderModeDelete, 'X', QUAL_ANY));
+            popup.AddChild(CreateMenuItem("Delete", @BlenderModeDelete, KEY_X, QUAL_ANY));
 
 
-        popup.AddChild(CreateMenuItem("Select all", @SelectAll, 'A', QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Deselect all", @DeselectAll, 'A', QUAL_SHIFT | QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Select all", @SelectAll, KEY_A, QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Deselect all", @DeselectAll, KEY_A, QUAL_SHIFT | QUAL_CTRL));
 
 
         CreateChildDivider(popup);
         CreateChildDivider(popup);
         popup.AddChild(CreateMenuItem("Reset to default", @ResetToDefault));
         popup.AddChild(CreateMenuItem("Reset to default", @ResetToDefault));
@@ -384,52 +384,52 @@ void CreateMenuBar()
             popup.AddChild(CreateMenuItem("Reset position", @SceneResetPosition, '1' , QUAL_ALT));
             popup.AddChild(CreateMenuItem("Reset position", @SceneResetPosition, '1' , QUAL_ALT));
             popup.AddChild(CreateMenuItem("Reset rotation", @SceneResetRotation, '2' , QUAL_ALT));
             popup.AddChild(CreateMenuItem("Reset rotation", @SceneResetRotation, '2' , QUAL_ALT));
             popup.AddChild(CreateMenuItem("Reset scale", @SceneResetScale, '3' , QUAL_ALT));
             popup.AddChild(CreateMenuItem("Reset scale", @SceneResetScale, '3' , QUAL_ALT));
-            popup.AddChild(CreateMenuItem("Reset transform", @SceneResetTransform, 'Q' , QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Reset transform", @SceneResetTransform, KEY_Q , QUAL_ALT));
         }
         }
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         {
         {
-            popup.AddChild(CreateMenuItem("Reset position", @SceneResetPosition, 'G' , QUAL_ALT));
-            popup.AddChild(CreateMenuItem("Reset rotation", @SceneResetRotation, 'R', QUAL_ALT));
-            popup.AddChild(CreateMenuItem("Reset scale", @SceneResetScale, 'S', QUAL_ALT));
-            popup.AddChild(CreateMenuItem("Reset transform", @SceneResetTransform, 'Q' , QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Reset position", @SceneResetPosition, KEY_G , QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Reset rotation", @SceneResetRotation, KEY_R, QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Reset scale", @SceneResetScale, KEY_S, QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Reset transform", @SceneResetTransform, KEY_Q , QUAL_ALT));
         }
         }
 
 
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
         {
         {
-            popup.AddChild(CreateMenuItem("Enable/disable", @SceneToggleEnable, 'E', QUAL_CTRL));
-            popup.AddChild(CreateMenuItem("Enable all", @SceneEnableAllNodes, 'E', QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Enable/disable", @SceneToggleEnable, KEY_E, QUAL_CTRL));
+            popup.AddChild(CreateMenuItem("Enable all", @SceneEnableAllNodes, KEY_E, QUAL_ALT));
         }
         }
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         {
         {
-            popup.AddChild(CreateMenuItem("Enable/disable", @SceneToggleEnable, 'H'));
-            popup.AddChild(CreateMenuItem("Enable all", @SceneEnableAllNodes, 'H', QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Enable/disable", @SceneToggleEnable, KEY_H));
+            popup.AddChild(CreateMenuItem("Enable all", @SceneEnableAllNodes, KEY_H, QUAL_ALT));
         }
         }
 
 
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
-            popup.AddChild(CreateMenuItem("Unparent", @SceneUnparent, 'U', QUAL_CTRL));
+            popup.AddChild(CreateMenuItem("Unparent", @SceneUnparent, KEY_U, QUAL_CTRL));
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
-            popup.AddChild(CreateMenuItem("Unparent", @SceneUnparent, 'P', QUAL_ALT));
+            popup.AddChild(CreateMenuItem("Unparent", @SceneUnparent, KEY_P, QUAL_ALT));
 
 
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
-            popup.AddChild(CreateMenuItem("Parent to last", @NodesParentToLastSelected, 'U'));
+            popup.AddChild(CreateMenuItem("Parent to last", @NodesParentToLastSelected, KEY_U));
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         else if (hotKeyMode == HOTKEYS_MODE_BLENDER)
-            popup.AddChild(CreateMenuItem("Parent to last", @NodesParentToLastSelected, 'P', QUAL_CTRL));
+            popup.AddChild(CreateMenuItem("Parent to last", @NodesParentToLastSelected, KEY_P, QUAL_CTRL));
 
 
         CreateChildDivider(popup);
         CreateChildDivider(popup);
 
 
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
         if (hotKeyMode == HOTKEYS_MODE_STANDARD)
-            popup.AddChild(CreateMenuItem("Toggle update", @ToggleSceneUpdate, 'P', QUAL_CTRL));
+            popup.AddChild(CreateMenuItem("Toggle update", @ToggleSceneUpdate, KEY_P, QUAL_CTRL));
         //else if (hotKeyMode == HOT_KEYS_MODE_BLENDER)
         //else if (hotKeyMode == HOT_KEYS_MODE_BLENDER)
-        //    popup.AddChild(CreateMenuItem("Toggle update", @ToggleSceneUpdate, 'P', QUAL_CTRL));
+        //    popup.AddChild(CreateMenuItem("Toggle update", @ToggleSceneUpdate, KEY_P, QUAL_CTRL));
 
 
         if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         if (hotKeyMode == HOTKEYS_MODE_BLENDER)
         {
         {
-             popup.AddChild(CreateMenuItem("Move to layer", @ShowLayerMover, 'M'));
-             popup.AddChild(CreateMenuItem("Smart Duplicate", @SceneSmartDuplicateNode, 'D', QUAL_ALT));
+             popup.AddChild(CreateMenuItem("Move to layer", @ShowLayerMover, KEY_M));
+             popup.AddChild(CreateMenuItem("Smart Duplicate", @SceneSmartDuplicateNode, KEY_D, QUAL_ALT));
              popup.AddChild(CreateMenuItem("View closer", @ViewCloser, KEY_KP_PERIOD));
              popup.AddChild(CreateMenuItem("View closer", @ViewCloser, KEY_KP_PERIOD));
         }
         }
-        popup.AddChild(CreateMenuItem("Color wheel", @ColorWheelBuildMenuSelectTypeColor, 'W', QUAL_ALT));
-        popup.AddChild(CreateMenuItem("Show components icons", @ViewDebugIcons, 'I', QUAL_ALT));
+        popup.AddChild(CreateMenuItem("Color wheel", @ColorWheelBuildMenuSelectTypeColor, KEY_W, QUAL_ALT));
+        popup.AddChild(CreateMenuItem("Show components icons", @ViewDebugIcons, KEY_I, QUAL_ALT));
 
 
         CreateChildDivider(popup);
         CreateChildDivider(popup);
 
 
@@ -500,11 +500,11 @@ void CreateMenuBar()
     {
     {
         Menu@ menu = CreateMenu("UI-layout");
         Menu@ menu = CreateMenu("UI-layout");
         Window@ popup = menu.popup;
         Window@ popup = menu.popup;
-        popup.AddChild(CreateMenuItem("Open UI-layout...", @PickFile, 'O', QUAL_ALT));
-        popup.AddChild(CreateMenuItem("Save UI-layout", @SaveUILayoutWithExistingName, 'S', QUAL_ALT));
+        popup.AddChild(CreateMenuItem("Open UI-layout...", @PickFile, KEY_O, QUAL_ALT));
+        popup.AddChild(CreateMenuItem("Save UI-layout", @SaveUILayoutWithExistingName, KEY_S, QUAL_ALT));
         popup.AddChild(CreateMenuItem("Save UI-layout as...", @PickFile));
         popup.AddChild(CreateMenuItem("Save UI-layout as...", @PickFile));
         CreateChildDivider(popup);
         CreateChildDivider(popup);
-        popup.AddChild(CreateMenuItem("Close UI-layout", @CloseUILayout, 'C', QUAL_ALT));
+        popup.AddChild(CreateMenuItem("Close UI-layout", @CloseUILayout, KEY_C, QUAL_ALT));
         popup.AddChild(CreateMenuItem("Close all UI-layouts", @CloseAllUILayouts));
         popup.AddChild(CreateMenuItem("Close all UI-layouts", @CloseAllUILayouts));
         CreateChildDivider(popup);
         CreateChildDivider(popup);
         popup.AddChild(CreateMenuItem("Load child element...", @PickFile));
         popup.AddChild(CreateMenuItem("Load child element...", @PickFile));
@@ -518,9 +518,9 @@ void CreateMenuBar()
     {
     {
         Menu@ menu = CreateMenu("View");
         Menu@ menu = CreateMenu("View");
         Window@ popup = menu.popup;
         Window@ popup = menu.popup;
-        popup.AddChild(CreateMenuItem("Hierarchy", @ToggleHierarchyWindow, 'H', QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Attribute inspector", @ToggleAttributeInspectorWindow, 'I', QUAL_CTRL));
-        popup.AddChild(CreateMenuItem("Resource browser", @ToggleResourceBrowserWindow, 'B', QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Hierarchy", @ToggleHierarchyWindow, KEY_H, QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Attribute inspector", @ToggleAttributeInspectorWindow, KEY_I, QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Resource browser", @ToggleResourceBrowserWindow, KEY_B, QUAL_CTRL));
         popup.AddChild(CreateMenuItem("Material editor", @ToggleMaterialEditor));
         popup.AddChild(CreateMenuItem("Material editor", @ToggleMaterialEditor));
         popup.AddChild(CreateMenuItem("Particle editor", @ToggleParticleEffectEditor));
         popup.AddChild(CreateMenuItem("Particle editor", @ToggleParticleEffectEditor));
         popup.AddChild(CreateMenuItem("Spawn editor", @ToggleSpawnEditor));
         popup.AddChild(CreateMenuItem("Spawn editor", @ToggleSpawnEditor));
@@ -1391,7 +1391,7 @@ void HandleHotKeysBlender( VariantMap& eventData)
         if (pickMode >= MAX_PICK_MODES)
         if (pickMode >= MAX_PICK_MODES)
             pickMode = PICK_GEOMETRIES;
             pickMode = PICK_GEOMETRIES;
     }
     }
-    else if (key == 'Z' && eventData["Qualifiers"].GetInt() != QUAL_CTRL)
+    else if (key == KEY_Z && eventData["Qualifiers"].GetInt() != QUAL_CTRL)
     {
     {
         if (ui.focusElement is null)
         if (ui.focusElement is null)
         {
         {