Keyboard not working with NumberInput
Hello,
I'm working with iced_aw 0.9.3 and iced 0.12.1 and experiencing an issue with the NumberInput. I can't write inside using the numpad or upper line of my keyboard; whether it's focused or if the mouse is over it.
I even tried to fork the repository and run the example and, I came to the same issue.
So before trying to fix it myself, I was wondering if it's my fault or not. I'm running it on Archlinux with Rustc 1.79.0.
The issue also occurred on a computer running Windows.
Thanks in advance
You can write inside, but there are limitations atm till we figure out how to deal with them. You can not write a - or a . Inside the text box. This is due to floating points and signed versus unsigned. We do not yet have a way to easily know the difference from a generic. You can only write numbers, but that is limited to the min and max settings of the number input.
Maybe it's because of my French layout, but the numbers above the keyboard do not work and in the num pad I can only write 4 and 6 (2 and 8 acting as arrows and the rest does nothing)
Ahh yeah, idk if Iced supports different Layouts other than the qwerty English layout.
So I'm going to dive into it, because I don't have issues with iced's widgets including Textinput And maybe I'll find a fix to this and propose it here
We do accept PR's so that is fine. I just dont know what the cause would be.
I don't know either, hence my question
oh I think you are right though the numberpad numbers do not output at all. I'll see why.
I found out why, and I'm going to correct it. It's because the key on the number pad are named even when the number are activated, so the code never reach the part where it tries to add the number
we need to ensure that numlock is enabled before we look at the numbers though. I will let you know what I find in winit on how to know this.
With Numpad activated :
KeyPressed { key: Named(ArrowDown), location: Numpad, modifiers: Modifiers(0x0), text: Some("2") }
without
KeyPressed { key: Named(ArrowDown), location: Numpad, modifiers: Modifiers(0x0), text: None }
So we just have to look at the text field, and same goes for the upper line of the French keyboard
ok yeah they had no means or actually knowing but i guess this works with Text so its good that works.
It seems that with #309 I broke once again the logic on the number input. The numpad of at least french keyboard is not working. Can you reopen the issue and I'll try to solve it once again
Reopening for another known issue.