Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

is_key_down and is_key_pressed not working in 0.4.0 on macOS #101

@Plonq

Description

@Plonq

With comfy 0.4.0, using the following code, nothing is printed when pressing spacebar. This bug doesn't exist in 0.3.1.

use comfy::*;

simple_game!("Bug Repro", setup, update);

fn setup(_c: &mut EngineContext) {}

pub fn update(_c: &mut EngineContext) {
    if is_key_down(KeyCode::Space) {
        println!("Space is down");
    }
    if is_key_pressed(KeyCode::Space) {
        println!("Space was pressed");
    }
}

Platform: macOS 14.5 (Sonoma)
Rust version: 1.78.0

I haven't tested other platforms.
Let me know if there's anything else I can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions