amethyst / amethyst/rustrogueliketutorial

Cannot go downstairs (keyboard input problem on Linux)

Open
#8 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
970
Forks
166
PR merge metrics
No merged PRs in 30d

Description

I'm unable to go downstairs in e.g. `cargo run` inside chapter-21-rexmenu.

My experiments with glutin's `cargo run --example window` show that when I press the period key on my keyboard, the events look like this:

```
WindowEvent { window_id: WindowId(Wayland(WindowId(94351912379904))), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 52, state: Pressed, virtual_keycode: None, modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
WindowEvent { window_id: WindowId(Wayland(WindowId(94351912379904))), event: ReceivedCharacter('.') }
```

I've no idea why virtual_keycode is None. Bug in glutin maybe?

I'm wondering if maybe ReceivedCharacter would be a better event to use for character-based input commands? Might it work better for people using non-QWERTY keyboard layouts? (I wonder how Dvorak users like to play roguelikes?)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.