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

Key disagreement on the web version #602

Open
nodai2hITC opened this issue Jan 26, 2025 · 0 comments
Open

Key disagreement on the web version #602

nodai2hITC opened this issue Jan 26, 2025 · 0 comments

Comments

@nodai2hITC
Copy link

Hello.
I'm trying to make a typing game using Pyxel, and I noticed a strange behavior.
はじめまして。
Pyxel を使って、タイピングゲームを作ろうとしているのですが、そこで、不思議な動作に気づきました。

    pyxel.text(0,  0, 'caret pressed.'    , 1 + 6*pyxel.btn(pyxel.KEY_CARET))
    pyxel.text(0, 10, 'atmark pressed.'   , 1 + 6*pyxel.btn(pyxel.KEY_AT))
    pyxel.text(0, 20, 'semicolon pressed.', 1 + 6*pyxel.btn(pyxel.KEY_SEMICOLON))
    pyxel.text(0, 30, 'colon pressed.'    , 1 + 6*pyxel.btn(pyxel.KEY_COLON))

The program works as expected in my local environment (Windows 11 + Python 3.11.1 + pyxel 2.3.1 + JIS keyboard).
However, when I use the pyxel web version, it does not work correctly on the same PC.
please see: https://nodai2hitc.github.io/pyxel_issue/key_disagreement.html
このプログラムは、私のローカル環境では期待通りに動作します。
しかし、web 版を使うと、同じ PC でも正しく動作しなくなってしまいます。

In Firefox (134.0.2 / 64 bit), ; works correctly, but ^, @, : do not respond.
On Chrome (132.0.6834.111 / 64 bit), ^, @, : do not respond as well, and ; responds to the : key instead of the semicolon.
Firefox では、; は正常に動作しますが、^, @, : が反応しません。
Chrome では、同様に ^, @, : が反応せず、さらに ; はセミコロンではなく : キーに反応してしまいます。

Is this a problem that can be handled on the Pyxel side? Or is it a problem with SDL2 or something else that the Pyxel web version uses?
これは Pyxel 側で対応できる問題でしょうか?それとも Pyxel web 版 が利用しているSDL2 等の問題でしょうか?

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

No branches or pull requests

1 participant