You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The binding API let libf3d user defines bindings to interact with, however most of these bindings should not support being repeated. Lets add a control for that
Describe the solution you'd like
Add a repeat arg to the binding API
Implement the feature of not repeating input
Add doc and tests
Context
Original issue: Input command toggles repeatedly when key is held down #2082
Description
When pressing and holding down keys bound to toggle commands (such as toggling the axis visibility ui.axis or other boolean settings), the command rapidly switches its state (on/off/on/off). This causes performance issues, UI flickering, and makes the interaction unpleasant.
To Reproduce
Steps to reproduce the behavior:
Launch F3D.
Press and hold a key bound to a toggle command (e.g., axis visibility).
Expected behavior
When a toggle key is pressed and held, the state of the command should change only once. Holding the key should not trigger repetitive state changes.
Version: 3.0.0-146-g9e9123ec.
Build date: 2025-03-21 18:50:31.
Build system: Linux 64-bits.
Compiler: GNU 13.3.0.
Module ImGui: ON.
Module OpenEXR: OFF.
Module Raytracing: OFF.
VTK version: 9.4.1.
Additional context
The key input handling in vtkF3DImguiObserver triggers repeated KeyPress events without checking if the key is already pressed, causing the command to be continuously executed.
I've attempted a preliminary solution by using a keyState map to prevent repeated toggling, but it didn't fully resolve the issue. A more robust approach may be needed at the input handling or event propagation level.
Demonstration
I've attached a short video demonstrating this issue clearly.
Is your feature request related to a problem? Please describe.
The binding API let libf3d user defines bindings to interact with, however most of these bindings should not support being repeated. Lets add a control for that
Describe the solution you'd like
repeatarg to the binding APIContext
Original issue: Input command toggles repeatedly when key is held down #2082
Description
When pressing and holding down keys bound to toggle commands (such as toggling the axis visibility
ui.axisor other boolean settings), the command rapidly switches its state(on/off/on/off). This causes performance issues, UI flickering, and makes the interaction unpleasant.To Reproduce
Steps to reproduce the behavior:
Expected behavior
When a toggle key is pressed and held, the state of the command should change only once. Holding the key should not trigger repetitive state changes.
System Information:
9e9123ec760ad0f465e76a5cf1b9b46baf3bd7eb)F3D Information
Version: 3.0.0-146-g9e9123ec.
Build date: 2025-03-21 18:50:31.
Build system: Linux 64-bits.
Compiler: GNU 13.3.0.
Module ImGui: ON.
Module OpenEXR: OFF.
Module Raytracing: OFF.
VTK version: 9.4.1.
Additional context
The key input handling in
vtkF3DImguiObservertriggers repeatedKeyPressevents without checking if the key is already pressed, causing the command to be continuously executed.I've attempted a preliminary solution by using a
keyStatemap to prevent repeated toggling, but it didn't fully resolve the issue. A more robust approach may be needed at the input handling or event propagation level.Demonstration
I've attached a short video demonstrating this issue clearly.
Screencast.from.2025-03-22.08-55-43.webm