Number input: button visibility

I'm using the Number Input command for an event and playtesting on a PC. If I've been using the mouse prior to talking to this event (which brings up Number Input), the Number Input window appears with the up/down/enter buttons as seen in the spoiler below. However, let's say I use the keyboard prior to talking to this event (e.g., to move around and to trigger the event). When the Number Input window appears now, the buttons are no longer visible so I cannot use the mouse. But I'd like the player to have the option of using the buttons (and it's just weird to see them suddenly disappear).

This is due to the function below (in rpg_windows.js), which is called once by Window_NumberInput.start. (The misspelling of Visibility is in the original code.)


Window_NumberInput.prototype.updateButtonsVisiblity = function() {
    if (TouchInput.date > Input.date) {
        this.showButtons();
    } else {
        this.hideButtons();
    }
};


Since I'd like the buttons to be shown all the time if either a keyboard of touch/mouse device exists, my easy fix is to never hide the buttons so I'd modify the code above to just have this.showButtons(), which assumes everyone has both types of input available.



Does anyone else have any other suggestions? I guess an obvious one would be to test for the existence of touch/mouse devices beyond checking the date when it was last used: I'm not a Javascript expert and have not looked extensively through the Input or TouchInput classes.

The same thing happens for Window_ShopNumber too.

Spoiler
Mouse is used prior to Number Input.


ButtonsShown.png
Spoiler
Keyboard is used prior to Number Input.


ButtonsNotShown.png
Sry for bumping old thread. 
I'm currently finding the thing as you.


Currently , I'm making a small education Math game where player need to choose answer based on a simple question
@reckus our rule is one problem - one topic, please do not hijack other people's topic but make your own topic (besides, you violated the necroposting rules as well).


closing

Original thread: https://forums.rpgmakerweb.com/threads/number-input-button-visibility.64590/