Skip to content

Esc closes the app instead of the help overlay #110

Description

@MikePehel

Pressing Esc with the help overlay open quits Hawkeye. It should close the overlay. Esc is the common convention for dismissing menus and pop-ups, so it is the first key most users will try.

The overlay opens with ? at src/main.c:801, and pressing ? again is the only way out.

Hawkeye never calls SetExitKey, so raylib's default Esc to quit is still active. The main loop at src/main.c:468 runs on WindowShouldClose(), which goes true as soon as raylib sees that key.

src/ui_marker_input.c:29 already handles Esc to cancel marker label entry. It runs, then the app exits anyway on the next pass, so that path has never worked.

Fix is SetExitKey(KEY_NULL), then handle Esc directly. Close the marker entry if it is active, otherwise close the help overlay, otherwise quit.

wasm/wasm_main.c has its own copy of the input handling and needs the same change. Android has no keyboard.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions