[UE5.1.1, Bug Report] Input Key Selector widget ignores modifier keys.

  1. add an input key selector widget to your UserWidget.
  2. run PIE, click the widget and select an input key using the keyboard.
  3. G works, Shift + G works, Ctrl + G works, but Shift + Ctrl + G just sets “G”.

with such a widget it either just works or is unusable to me. If I want to set an entire input chord I want to do just that. On mouse it’s not even working at all. It’s pointless to include features which are broken. “Here’s a new bike, flat tires but you can fix that right?”. Every single feature released.

Here’s the issue:

FReply SInputKeySelector::OnKeyUp( const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent )
{
	FKey KeyUp = InKeyEvent.GetKey();
	EModifierKey::Type ModifierKey = EModifierKey::FromBools(
		InKeyEvent.IsControlDown() && KeyUp != EKeys::LeftControl && KeyUp != EKeys::RightControl,
		InKeyEvent.IsAltDown() && KeyUp != EKeys::LeftAlt && KeyUp != EKeys::RightAlt,
		InKeyEvent.IsShiftDown() && KeyUp != EKeys::LeftShift && KeyUp != EKeys::RightShift,
		InKeyEvent.IsCommandDown() && KeyUp != EKeys::LeftCommand && KeyUp != EKeys::RightCommand );

	// Dont allow chords consisting of just modifier keys.
	if ( bIsSelectingKey && (bAllowGamepadKeys || KeyUp.IsGamepadKey() == false) && ( KeyUp.IsModifierKey() == false || ModifierKey == EModifierKey::None ) )
	{
		SetIsSelectingKey( false );

		if (bEscapeCancelsSelection && (KeyUp == EKeys::Escape || IsEscapeKey(KeyUp)))
		{
			return FReply::Handled();
		}

		SelectKey(
			KeyUp,
			ModifierKey == EModifierKey::Shift,
			ModifierKey == EModifierKey::Control,
			ModifierKey == EModifierKey::Alt,
			ModifierKey == EModifierKey::Command);
		return FReply::Handled();
	}
	else if (!bIsSelectingKey && Button.IsValid())
	{
		return Button->OnKeyUp(MyGeometry, InKeyEvent);
	}

	return SCompoundWidget::OnKeyUp( MyGeometry, InKeyEvent );
}

Go catch em all