mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-22 21:50:51 -05:00
The 3D view decided whether to run its shortcuts from ImGui's "wants the keyboard" flag, which is updated a frame late. The first key typed after clicking into a field could still reach the canvas. The canvas now leaves every key to ImGui while an ImGui text field is active, while a popup (dropdown, menu or modal) is open, or while a slider or button is held with the mouse. A focused sidebar text field works the same way. Global shortcuts still run unless they edit text. Every key still goes to ImGui. - ImGuiWrapper::claim_key_event() decides on the key-down. The key's repeats, char event and release follow that decision, so a key never both runs a shortcut and types. - Esc closes an open dropdown or menu before the gizmo. - Esc and Tab during a slider drag no longer close the gizmo or switch views. - text_input_active() reads ImGui's text input request, so a slider that once had a value typed into it no longer counts as a text field when dragged. - A modifier whose key-up went to a dialog no longer stays stuck. The canvas releases held modifiers when it loses the focus, and ImGui takes its modifiers from each mouse event. - The macOS Edit menu's key equivalents follow the same rule.