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

Pyxel doesn't detect shift + key characters #382

Closed
techpixel opened this issue Mar 4, 2022 · 8 comments
Closed

Pyxel doesn't detect shift + key characters #382

techpixel opened this issue Mar 4, 2022 · 8 comments

Comments

@techpixel
Copy link

techpixel commented Mar 4, 2022

On my keyboard, Shift + = is +
But in pyxel, doing this combo returns = instead of +

Is this just a quirk of pyxel or is there another solution?

@techpixel techpixel changed the title Pyxel doesn't detect shift characters Pyxel doesn't detect shift + key characters Mar 4, 2022
@notbored
Copy link

notbored commented Mar 5, 2022

What OS and keyboard are you using? Also where are you trying to use the key combo?

@techpixel
Copy link
Author

OS - Windows 11 (NT 10)
Keyboard - Used both bluetooth and laptop keyboards. Not using keypad/numberpad

Using the keycombo with btnp() and pyxel.KEY_PLUS.

@techpixel
Copy link
Author

Also pyxel.input_text detects the + symbol

@notbored
Copy link

notbored commented Mar 7, 2022

I wonder if it's because KEY_PLUS is exactly that key(numpad) not <shift>+<equals>.

@techpixel
Copy link
Author

There is a specific KEY_KP_PLUS key for the number pad

@notbored
Copy link

notbored commented Mar 9, 2022

Okay I just tested it, as I've never used the + key for anything as of yet, and I'm getting the same issue.

I use a Macbook Air and am also unable to get the + to be recognised from the =/+ key when pressing <shift>+<=/+>.

@techpixel
Copy link
Author

Try testing it with pyxel.input_text

@kitao
Copy link
Owner

kitao commented Apr 30, 2022

Please understand the way to input "+" is different depends on the layout of a keyboard.
For example, in JP layout, "shift + ;" is "+".
So I adopted the virtual keycode used in SDL2.
If you would like to get "+" regardless of a keyboard layout, please use pyxel.input_text like @techpixel wrote.
And if there is other good way other than writing configuration files by users, please let me know.

@kitao kitao closed this as completed Apr 30, 2022
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

3 participants