[HELP] How do I alter which characters are available in the name imput window?

So I've been trying for a while to change which characters are available in the name input window, but no success.
What I'm trying to achieve is: get rid of the 'page',' ', and all other symbols. I want it to be left with only letters
and the 'OK' button (not even an option to add a space).

Spoiler: What I wanna do (illustrated)
I basically want to turn this:
before.png
into this:
second2.png

I've tried moving stuff around in the script, but then I'd lose the 'ok' functionality, or I'd get errors due to selecting the blank spaces. Best I've done so far is letting it end with Z,z,OK all next to each other and make the window smaller, but I still get the errors and the 'OK' option doesn't work.

The format of the window doesn't have to be exactly as I've illustrated, I just want to get rid of all the symbols, space and page options. there can be loads of empty spaces, as long as it doesn't get added to the name or crash the game.

Any help is greatly appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/help-how-do-i-alter-which-characters-are-available-in-the-name-imput-window.93970/