WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Automatically make the keyboard switch to lowercase after the first character

FieryMewtwo edited this page Sep 9, 2021 · 4 revisions

Before following this tutorial, please make sure your copy of pokeemerald has this commit applied to it.

This wiki tutorial was sourced from Pokecommunity. Thanks to Jaizu for the original code!

Go to src/naming_screen.c and edit the function static bool8 KeyboardKeyHandler_Character(u8 input).

static bool8 KeyboardKeyHandler_Character(u8 input)
{
    TryStartButtonFlash(BUTTON_COUNT, FALSE, FALSE);
    if (input == INPUT_A_BUTTON)
    {
        bool8 textFull = AddTextCharacter();
+ 
+ if (sNamingScreen ->currentPage == KBPAGE_LETTERS_UPPER && GetTextEntryPosition() == 1)
+     MainState_StartPageSwap();

        SquishCursor();
        if (textFull)
        {
            SetInputState(INPUT_STATE_OVERRIDE);
            sNamingScreen->state = STATE_MOVE_TO_OK_BUTTON;
        }
    }
    return FALSE;
}

static bool8 KeyboardKeyHandler_Page(u8 input)
{
    TryStartButtonFlash(BUTTON_PAGE, TRUE, FALSE);
    if (input == INPUT_A_BUTTON)
        return SwapKeyboardPage();
    else
        return FALSE;
}

That's it! You're done!

Clone this wiki locally