@@ -750,57 +750,57 @@ void TextEditor::HandleKeyboardInputs()
750750 io.WantCaptureKeyboard = true ;
751751 io.WantTextInput = true ;
752752
753- if (!IsReadOnly () && isShortcut && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Z) ))
753+ if (!IsReadOnly () && isShortcut && ImGui::IsKeyPressed (ImGuiKey_Z))
754754 Undo ();
755- else if (!IsReadOnly () && isAltOnly && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Backspace) ))
755+ else if (!IsReadOnly () && isAltOnly && ImGui::IsKeyPressed (ImGuiKey_Backspace))
756756 Undo ();
757- else if (!IsReadOnly () && isShortcut && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Y) ))
757+ else if (!IsReadOnly () && isShortcut && ImGui::IsKeyPressed (ImGuiKey_Y))
758758 Redo ();
759- else if (!IsReadOnly () && isShiftShortcut && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Z) ))
759+ else if (!IsReadOnly () && isShiftShortcut && ImGui::IsKeyPressed (ImGuiKey_Z))
760760 Redo ();
761- else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_UpArrow) ))
761+ else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGuiKey_UpArrow))
762762 MoveUp (1 , shift);
763- else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_DownArrow) ))
763+ else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGuiKey_DownArrow))
764764 MoveDown (1 , shift);
765- else if ((isOSX ? !ctrl : !alt) && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_LeftArrow) ))
765+ else if ((isOSX ? !ctrl : !alt) && !super && ImGui::IsKeyPressed (ImGuiKey_LeftArrow))
766766 MoveLeft (1 , shift, isWordmoveKey);
767- else if ((isOSX ? !ctrl : !alt) && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_RightArrow) ))
767+ else if ((isOSX ? !ctrl : !alt) && !super && ImGui::IsKeyPressed (ImGuiKey_RightArrow))
768768 MoveRight (1 , shift, isWordmoveKey);
769- else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_PageUp) ))
769+ else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGuiKey_PageUp))
770770 MoveUp (GetPageSize () - 4 , shift);
771- else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_PageDown) ))
771+ else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGuiKey_PageDown))
772772 MoveDown (GetPageSize () - 4 , shift);
773- else if (ctrl && !alt && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Home) ))
773+ else if (ctrl && !alt && !super && ImGui::IsKeyPressed (ImGuiKey_Home))
774774 MoveTop (shift);
775- else if (ctrl && !alt && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_End) ))
775+ else if (ctrl && !alt && !super && ImGui::IsKeyPressed (ImGuiKey_End))
776776 MoveBottom (shift);
777- else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Home) ))
777+ else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGuiKey_Home))
778778 MoveHome (shift);
779- else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_End) ))
779+ else if (!alt && !ctrl && !super && ImGui::IsKeyPressed (ImGuiKey_End))
780780 MoveEnd (shift);
781- else if (!IsReadOnly () && !alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Delete) ))
781+ else if (!IsReadOnly () && !alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGuiKey_Delete))
782782 Delete ();
783- else if (!IsReadOnly () && !alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Backspace) ))
783+ else if (!IsReadOnly () && !alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGuiKey_Backspace))
784784 Backspace ();
785- else if (!alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Insert) ))
785+ else if (!alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGuiKey_Insert))
786786 mOverwrite ^= true ;
787- else if (isCtrlOnly && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Insert) ))
787+ else if (isCtrlOnly && ImGui::IsKeyPressed (ImGuiKey_Insert))
788788 Copy ();
789- else if (isShortcut && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_C) ))
789+ else if (isShortcut && ImGui::IsKeyPressed (ImGuiKey_C))
790790 Copy ();
791- else if (!IsReadOnly () && isShiftOnly && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Insert) ))
791+ else if (!IsReadOnly () && isShiftOnly && ImGui::IsKeyPressed (ImGuiKey_Insert))
792792 Paste ();
793- else if (!IsReadOnly () && isShortcut && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_V) ))
793+ else if (!IsReadOnly () && isShortcut && ImGui::IsKeyPressed (ImGuiKey_V))
794794 Paste ();
795- else if (isShortcut && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_X) ))
795+ else if (isShortcut && ImGui::IsKeyPressed (ImGuiKey_X))
796796 Cut ();
797- else if (isShiftOnly && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Delete) ))
797+ else if (isShiftOnly && ImGui::IsKeyPressed (ImGuiKey_Delete))
798798 Cut ();
799- else if (isShortcut && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_A) ))
799+ else if (isShortcut && ImGui::IsKeyPressed (ImGuiKey_A))
800800 SelectAll ();
801- else if (!IsReadOnly () && !alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Enter) ))
801+ else if (!IsReadOnly () && !alt && !ctrl && !shift && !super && ImGui::IsKeyPressed (ImGuiKey_Enter))
802802 EnterCharacter (' \n ' , false );
803- else if (!IsReadOnly () && !alt && !ctrl && !super && ImGui::IsKeyPressed (ImGui::GetKeyIndex ( ImGuiKey_Tab) ))
803+ else if (!IsReadOnly () && !alt && !ctrl && !super && ImGui::IsKeyPressed (ImGuiKey_Tab))
804804 EnterCharacter (' \t ' , shift);
805805 if (!IsReadOnly () && !io.InputQueueCharacters .empty () && !ctrl && !super)
806806 {
0 commit comments