amethyst / amethyst/bracket-lib

Numpad keys not working on macOS

オープン
#222 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
1.7k
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

説明

Thanks for this library! I've been working my way through your fantastic Hands-on Rust book, but I can't get the numpad keys to work correctly on macOS.

This is what I have found so far, using the numpad8 key as an example

On a mac the scancode for numpad8 is 91

You can see this in the winit mac platform implementation here (0x5b converted to base 10 is 91)
https://github.com/rust-windowing/winit/blob/master/src/platform_impl/macos/event.rs#L185

However, looking at the bracket-lib `virtual_key_code_to_scan` function here I see it mapping to scancode 72 (which I believe is correct for windows)
https://github.com/amethyst/bracket-lib/blob/master/bracket-terminal/src/hal/crossterm_be/scancode_helper.rs#L59

In order to get it working on a mac I think `virtual_key_code_to_scan` would need to be aware of the platform currently running and use different scancodes on a mac?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。