# Specification: Fix `keys_down` AttributeError in ImGui IO

## 1. Overview
The application crashes with an `AttributeError: 'IO' object has no attribute 'keys_down'` in `src/gui_2.py` at line 695. This occurs when the application attempts to check if specific keys (like 'R' for the `Ctrl+Alt+R` hot-reload shortcut) are pressed using the legacy `io.keys_down` array, which is no longer available or supported in the current `imgui-bundle` version.

## 2. Functional Requirements
*   **Update Key State Queries:** Refactor the codebase (specifically `src/gui_2.py` and any other occurrences) to replace usages of `io.keys_down[ord('X')]` with the modern and correct ImGui API for querying key states (e.g., `imgui.is_key_down(imgui.Key.r)` or equivalent based on `imgui-bundle` specifications).
*   **Restore Hotkeys:** Ensure that the hot-reload shortcut (`Ctrl+Alt+R`) and any other affected shortcuts function correctly without crashing the application.

## 3. Non-Functional Requirements
*   **Maintain Compatibility:** The fix must be compatible with the currently installed version of `imgui-bundle` and Python 3.11+.

## 4. Acceptance Criteria
*   Pressing `Ctrl+Alt+R` triggers the hot-reload functionality (or handles the shortcut gracefully) without raising an `AttributeError`.
*   A codebase search confirms no remaining uses of `io.keys_down` exist.
*   The application starts and runs normally without immediate exceptions in the event loop.

## 5. Out of Scope
*   Adding new hotkeys.
*   Refactoring the entire hot-reload architecture (only fixing the input detection).
