Skip to content

Conversation

@MikeSchulze
Copy link
Collaborator

@MikeSchulze MikeSchulze commented Jan 6, 2026

Why

After reviewing the test coverage of “simulate key” once again, I decide to revise it to improve it.

What

Revision of simulation tests for keys with modifiers and correction of incorrect assumptions for creating key events. Adding more specific use cases

  • pressing key combination SHIFT+A
  • pressing key combination A+SHIFT
  • releasing key combination SHIFT+A
  • pressed key combination SHIFT+A
  • pressing key A and using the modifier SHIFT
  • releasing key A and using the modifier SHIFT
  • pressed key A and using the modifier SHIFT

Evaluate the built events by using an SPY to verify the input events are built like the Godot engine by using the addons\gdUnit4\test\core\InputEventTestScene.tscn

  • Fixes wrong setting key input event modifiers
  • Set simulate_key_pressed, simulate_key_press, simulate_key_release as deprecated
  • Improve the class documentation by adding an example

@MikeSchulze MikeSchulze self-assigned this Jan 6, 2026
@MikeSchulze MikeSchulze linked an issue Jan 6, 2026 that may be closed by this pull request
6 tasks
…ests

# Why
After reviewing the test coverage of “simulate key” once again, I decide to revise it to improve it.

# What
Revision of simulation tests for keys with modifiers and correction of incorrect assumptions for creating key events.
Adding more specific use cases
- pressing SHIFT+A
- pressing A+SHIFT
- releasing SHIFT+A
- pressed SHIFT+A
- pressing A and use modifier SHIFT
- releasing A and use modifier SHIFT
- pressed A and use modifier SHIFT

Evaluate the builded events by using SPY to verify the input events is build like using the `addons\gdUnit4\test\core\InputEventTestScene.tscn`

- Fixes wrong setting key input event modifieres
@MikeSchulze MikeSchulze added the API Marks the issue API related. label Jan 6, 2026
@MikeSchulze MikeSchulze changed the title TASK-1055: Revisit the GdUnitSceneRunnerInputEventTest simulate key tests GD-1055: Revisit the simulate_key_.. API and make the modifier arguments deprecated Jan 6, 2026
@MikeSchulze MikeSchulze merged commit c8d63a9 into master Jan 6, 2026
13 checks passed
@MikeSchulze MikeSchulze deleted the TASK-1055 branch January 6, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Marks the issue API related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GD-1055: Revisit the GdUnitSceneRunnerInputEventTest simulate key tests

2 participants