Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

is_key_down and is_key_pressed not working in 0.4.0 on macOS #101

Open
Plonq opened this issue May 24, 2024 · 1 comment · May be fixed by #102
Open

is_key_down and is_key_pressed not working in 0.4.0 on macOS #101

Plonq opened this issue May 24, 2024 · 1 comment · May be fixed by #102

Comments

@Plonq
Copy link

Plonq commented May 24, 2024

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.

@Plonq Plonq linked a pull request May 26, 2024 that will close this issue
@LuckyTurtleDev
Copy link

LuckyTurtleDev commented Jul 6, 2024

same on arch linux

the mention pr pix the issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants