Skip to content

Commit

Permalink
Invert the if check for key repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Jan 1, 2024
1 parent 64b997e commit c9c8a88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/FNAPlatform/SDL2_FNAPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -963,33 +963,33 @@ ref bool textInputSuppress
Keyboard.RightControlDown = true;
}

if (evt.key.repeat > 0)
if (evt.key.repeat == 0)
{
int textIndex;
if (FNAPlatform.TextInputBindings.TryGetValue(key, out textIndex))
{
textInputControlDown[textIndex] = true;
TextInputEXT.OnTextInput(FNAPlatform.TextInputCharacters[textIndex]);
}
else if ((Keyboard.LeftControlDown || Keyboard.RightControlDown)
&& key == Keys.V)
{
textInputControlDown[6] = true;
TextInputEXT.OnTextInput(FNAPlatform.TextInputCharacters[6]);
textInputSuppress = true;
}
}
else
{
int textIndex;
if (FNAPlatform.TextInputBindings.TryGetValue(key, out textIndex))
{
textInputControlDown[textIndex] = true;
TextInputEXT.OnTextInput(FNAPlatform.TextInputCharacters[textIndex]);
}
else if ((Keyboard.LeftControlDown || Keyboard.RightControlDown)
&& key == Keys.V)
{
textInputControlDown[6] = true;
TextInputEXT.OnTextInput(FNAPlatform.TextInputCharacters[6]);
textInputSuppress = true;
}
}
}
Expand Down

0 comments on commit c9c8a88

Please sign in to comment.