Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keypresses don't work on wayland #848

Open
treeshateorcs opened this issue Oct 20, 2024 · 2 comments
Open

Keypresses don't work on wayland #848

treeshateorcs opened this issue Oct 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@treeshateorcs
Copy link

treeshateorcs commented Oct 20, 2024

use macroquad::prelude::*;

fn window_conf() -> Conf {
  use macroquad::miniquad;

  Conf {
    window_title: "window".to_owned(),
    fullscreen: false,
    platform: miniquad::conf::Platform {
      linux_backend: miniquad::conf::LinuxBackend::WaylandOnly,
      ..Default::default()
    },
    ..Default::default()
  }
}

#[macroquad::main(window_conf)]
async fn main() {
  loop {
    if is_key_down(KeyCode::Escape) {
      return;
    }
    if is_key_pressed(KeyCode::Escape) {
      return;
    }
    if is_key_released(KeyCode::Escape) {
      return;
    }
    next_frame().await;
  }
}

none of those functions work. i'm using sway (wlroots)

@treeshateorcs treeshateorcs changed the title Keypresses don't work on wayland Keypresses don't work Oct 20, 2024
@treeshateorcs treeshateorcs changed the title Keypresses don't work Keypresses don't work on wayland Oct 20, 2024
@treeshateorcs
Copy link
Author

same code works fine in i3

@not-fl3 not-fl3 added the bug Something isn't working label Oct 21, 2024
@treeshateorcs
Copy link
Author

treeshateorcs commented Nov 15, 2024

version 0.3.20 works

p.s. wait, no, sorry it doesn't work. i forgot that i was testing in xwayland

@not-fl3 not-fl3 closed this as completed Nov 15, 2024
@not-fl3 not-fl3 reopened this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants