Numpad in INPUT

Previous topic - Next topic

kamakazieturtle

Is it possible to get values from the numpad with the INPUT command?

Kitty Hello

is it not? OOps! I'll see.

MrTAToad

I suspect it would depend on whether the Num Lock button is on or not...

kamakazieturtle

I haven't tested with KEY() but I think that works. Its only with INPUT as far as I know. I remember having the same problem in C++, could never get numbers from the numpad on input either. Thank you guys for taking in interest in this.

Moru

When using input you only get the characters as the keyboard usually is working. So you need to have numlock on. If you use KEY() you are requesting a position on the keyboard so it doesn't matter what it says on the label, you get the same result, same physical button.

This is not entirely true due to national keyboards moving around some of the physical buttons. This can easiest be fixed by letting the user change the button to their liking and only access buttons with KEY(). See Gernots exellent keyhit library :-)

kamakazieturtle

I've tried turning the key on and off repeatedly while testing and I can't get anything to show up with INPUT. I also want people to be able to use both buttons but I'm using INPUT to enter values. It would be rather easy to go to the number pad then on top the keyboard.

MrTAToad

Yes, defintely doesn't work with the number pad - better make a bug report...

Hemlos

Gernot already said he would check into it..

I moved the topic into bug reports, to tidy.
Bing ChatGpt is pretty smart :O