Skip to content

feat: add Keyboard mode - #38

Open
repinek wants to merge 7 commits into
astra1dev:mainfrom
repinek:repinek/keyboard-support
Open

feat: add Keyboard mode#38
repinek wants to merge 7 commits into
astra1dev:mainfrom
repinek:repinek/keyboard-support

Conversation

@repinek

@repinek repinek commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Taken from Projects, this PR introduces keyboard mode and some other improvements


I also tried to implement (re-implement) this:

// Keyboard.ts :: setKeyboardMode()
        if (UnityUtils.instanceExists(this.HudManager)) {
            const instance = UnityUtils.getInstance(this.HudManager);
            if (instance) {
                if (instance.field("joystick").isNull()) {
                    instance.method("SetTouchType").invoke(this.keyboardControlValue);
                } 
            }
        };

        const oldType = this.ActiveInputManager.field<Il2Cpp.ValueType>("currentControlType").value;
        // Get actual values of enums
        const oldTypeValue = oldType.field<number>("value__").value;
        const keyboardTypeValue = this.keyboardInputValue.field<number>("value__").value;

        if (oldTypeValue != keyboardTypeValue) {
            this.ActiveInputManager.field("currentControlType").value = this.keyboardInputValue;

            // Update current input source by calling System.Action (if not null)
            const action = this.ActiveInputManager.field<Il2Cpp.Object>("CurrentInputSourceChanged").value;
            Logger.debug(action, action.handle);
            if (!action.isNull()) {
                Logger.debug("hi action")
                action.method<void>("Invoke", 0).invoke();
            };
        }

But it looks completely useless and doesn't seem to do anything, so I'm not adding it.
Feel free to test it, though.

Also, there's something wrong with the Full Resolution feature: if I launch the game with it enabled, I'm almost guaranteed to get a STRMISS error. (not sure tho, but maybe is it)


Also, Please add de localization for this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant