GLBasic forum

Main forum => Bug Reports => Topic started by: kamakazieturtle on 2009-Dec-31

Title: Numpad in INPUT
Post by: kamakazieturtle on 2009-Dec-31
Is it possible to get values from the numpad with the INPUT command?
Title: Re: Question?
Post by: Kitty Hello on 2010-Jan-04
is it not? OOps! I'll see.
Title: Re: Numpad in INPUT
Post by: MrTAToad on 2010-Jan-04
I suspect it would depend on whether the Num Lock button is on or not...
Title: Re: Numpad in INPUT
Post by: kamakazieturtle on 2010-Jan-05
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.
Title: Re: Numpad in INPUT
Post by: Moru on 2010-Jan-05
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 :-)
Title: Re: Numpad in INPUT
Post by: kamakazieturtle on 2010-Jan-05
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.
Title: Re: Numpad in INPUT
Post by: MrTAToad on 2010-Jan-06
Yes, defintely doesn't work with the number pad - better make a bug report...
Title: Re: Numpad in INPUT
Post by: Hemlos on 2010-Jan-08
Gernot already said he would check into it..

I moved the topic into bug reports, to tidy.