Forum Archive

console.input_alert -- show only number pad instead of full keyboard?

claggs

I am wanting to use console.input_alert to take user input, but would like it to show the numpad instead of a full keyboard. Is this possible?

briarfox

@claggs I do not believe so. Your best bet is to create a ui number pad and your own ui input alert.

dgelessus

The ui module has the option to use various keyboards for text fields, the ones you are probably looking for are KEYBOARD_DECIMAL_PAD, KEYBOARD_NUMBERS, KEYBOARD_NUMBER_PAD and KEYBOARD_PHONE_PAD. On an iPad they all just display the regular number keyboard section (.?123), but on an iPhone they will most likely display different number pads. As I don't own an iPhone and the documentation doesn't go into much detail, I can't say what exactly the differences between the four keyboard types are.

briarfox

@dgelessus Thank you, I was unaware of this feature.