[RMXP] Key Number Input Script

Hi everyone! The title says it all - I'm looking for a script (if it's even possible) that lets the player use the keyboard's number pad to input numbers instead of using the arrow keys to find the number. (I was honestly surprised the Input Number command was done that way instead of the intuitive keyboard number pad - how tedious!)

I've seen Yanfly's Key Number Input and it's exactly what I need, unfortunately it's only for MV. Would love one for XP ;_;

Please and thanks in advance!
You first need to get a script that can accept input from any key on the keyboard. There's a number of them, but I will use Blizzard's from Tons of Add-ons. Just insert this script below it:
Ruby:
#==============================================================================
# Input Number with Numpad                                         Author: KK20
#                                                             Date: Mar 10 2024
#------------------------------------------------------------------------------
# Allows the use of the numpad keys to input a number when using the "Input
# Number" event command. Requires "Custom Game Controls" from Tons of Add-ons:
#         https://forum.chaos-project.com/index.php/topic,105.0.html
#
# This script should be placed below Tons of Add-ons.
# No other instructions, this is plug-n-play.
#==============================================================================
module Input
  Key['NumberPad 0'] = 0x60
  Key['NumberPad 1'] = 0x61
  Key['NumberPad 2'] = 0x62
  Key['NumberPad 3'] = 0x63
  Key['NumberPad 4'] = 0x64
  Key['NumberPad 5'] = 0x65
  Key['NumberPad 6'] = 0x66
  Key['NumberPad 7'] = 0x67
  Key['NumberPad 8'] = 0x68
  Key['NumberPad 9'] = 0x69
 
  def self.numpad_keys
    [Key['NumberPad 7'], Key['NumberPad 8'], Key['NumberPad 9'],
     Key['NumberPad 4'], Key['NumberPad 5'], Key['NumberPad 6'],
     Key['NumberPad 1'], Key['NumberPad 2'], Key['NumberPad 3'],
     Key['NumberPad 0']]
   end
end

#==============================================================================
# ** Window_InputNumber
#------------------------------------------------------------------------------
#  This window is for inputting numbers, and is used within the
#  message window.
#==============================================================================

class Window_InputNumber < Window_Base
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias update_for_arrow_keys update
  def update
    num = nil
    if Input.repeat?(Input.numpad_keys) || Input.repeat?(Input::B)
      super
      num =
        if Input.repeat?(Input::Key['NumberPad 0']) then 0
        elsif Input.repeat?(Input::Key['NumberPad 1']) then 1
        elsif Input.repeat?(Input::Key['NumberPad 2']) then 2
        elsif Input.repeat?(Input::Key['NumberPad 3']) then 3
        elsif Input.repeat?(Input::Key['NumberPad 4']) then 4
        elsif Input.repeat?(Input::Key['NumberPad 5']) then 5
        elsif Input.repeat?(Input::Key['NumberPad 6']) then 6
        elsif Input.repeat?(Input::Key['NumberPad 7']) then 7
        elsif Input.repeat?(Input::Key['NumberPad 8']) then 8
        elsif Input.repeat?(Input::Key['NumberPad 9']) then 9
        end
       
      if num
        $game_system.se_play($data_system.cursor_se)
        # Get current place number and change it to 0
        place = 10 ** (@digits_max - 1 - @index)
        n = @number / place % 10
        @number -= n * place
        # Reset current place number
        @number += num * place
        # move cursor right
        @index = [@index + 1, @digits_max - 1].min
      else
        $game_system.se_play($data_system.buzzer_se)
        # Get current place number and change it to 0
        place = 10 ** (@digits_max - 1 - @index)
        n = @number / place % 10
        @number -= n * place
        # move cursor left
        @index = [@index - 1, 0].max
      end
     
      update_cursor_rect
      refresh
      return
    end
    update_for_arrow_keys
  end
end
Still allows the default use of the arrow keys. Pressing your game's cancel button (Input::B) will set the cursor's number to zero and move it back one digit.
Apologies for the late reply, work caught up with me! ;_; Thank you so much! You have my deepest appreciation and credits will be given of course <3

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-key-number-input-script.166614/