Skip to content

Keyboard Module

STBrian edited this page Nov 9, 2026 · 1 revision

The Keyboard submodule provides functions to open the Nintendo 3DS software keyboard dialogs, allowing scripts to prompt the user for text, floating-point numbers, integers, hexadecimal values, or select an option from a list.

Functions

Core.Keyboard.getString Opens a keyboard dialog prompting for a text string
Core.Keyboard.getNumber Opens a keyboard dialog prompting for a decimal number
Core.Keyboard.getInteger Opens a keyboard dialog prompting for an unsigned integer
Core.Keyboard.getHex Opens a keyboard dialog prompting for a hexadecimal integer
Core.Keyboard.populate Opens a selection keyboard populated with custom options

Core.Keyboard.getString

Opens the software keyboard on the bottom screen, optionally displaying a message on the top screen. Returns the text entered by the user, or nil if the user cancelled the dialog.

Core.Keyboard.getString(message: string?) -> string?

Example

local name = Core.Keyboard.getString("Enter player nickname:")
if name then
    Core.Debug.message("Hello, " .. name)
end

Core.Keyboard.getNumber

Opens the software keyboard configured for decimal/floating-point number input. Returns the numeric value entered, or nil if cancelled.

Core.Keyboard.getNumber(message: string?) -> number?

Example

local speed = Core.Keyboard.getNumber("Enter custom move speed:")
if speed then
    Game.LocalPlayer.MoveSpeed = speed
end

Core.Keyboard.getInteger

Opens the software keyboard configured for unsigned integer input. Returns the integer value entered, or nil if cancelled.

Core.Keyboard.getInteger(message: string?) -> integer?

Example

local count = Core.Keyboard.getInteger("Enter item stack count:")
if count then
    Core.Debug.log("Stack count: " .. count)
end

Core.Keyboard.getHex

Opens the software keyboard configured for hexadecimal input. Returns the parsed integer value, or nil if cancelled.

Core.Keyboard.getHex(message: string?) -> integer?

Example

local address = Core.Keyboard.getHex("Enter memory address in hex:")
if address then
    local val = Core.Memory.readU32(address)
    Core.Debug.message("Value: " .. tostring(val))
end

Core.Keyboard.populate

Opens a list selection keyboard containing the strings provided in the options table. Returns the 1-based index of the chosen option, or nil if cancelled or if the options table is empty.

Core.Keyboard.populate(options: table<string>) -> integer?

Example

local choices = {"Survival", "Creative", "Adventure"}
local selected = Core.Keyboard.populate(choices)
if selected then
    Core.Debug.message("Selected mode: " .. choices[selected])
end

Clone this wiki locally