**REPORTED** keybinding grapple=enter shows unwanted text box instead [regression, running unmodified v1.4.0.5]

C3n&g3mC#

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Single
Operating System
Windows 10
Terraria Version
1.4.0.5
Controls Used
Keyboard/Mouse
Lefthanded here.
I've been playing with my mouse on the left hand and I've set up my numeric keys (at right of my keyboard) for all other combat/movement/... buttons.

'Enter' on numeric keyboard for me has always been bound to my grapple.
However, since 1.4 enter only opens up a text box!? No longer can grapple as of 1.4
I don't know how to unbind that opening of the text box, doesn't seem to have an entry in the keybindings section. (at least, couldn't find one)

I'm only playing 1-player, so didn't need the social aspects anyway, so the text box is not really wanted here either.

Could you please either accept this bug or tell me how I can bypass it? (e.g. update an .ini or something else to just block the new text box that opens up on enter? sw engineer of 20 years here, can take some pointers)
I just want to retain old pre-1.4 grapple behavior.

As a lefthanded, I'm pretty much set on this key layout, so due to this regression haven't been able to run 1.4 yet.

Thanks!
\Johan 'Eyolas'
 

Attachments

  • grapple shows text box instead.png
    grapple shows text box instead.png
    908.9 KB · Views: 94
  • key bindings.png
    key bindings.png
    608.9 KB · Views: 104
Lefthanded here.
I've been playing with my mouse on the left hand and I've set up my numeric keys (at right of my keyboard) for all other combat/movement/... buttons.

'Enter' on numeric keyboard for me has always been bound to my grapple.
However, since 1.4 enter only opens up a text box!? No longer can grapple as of 1.4
I don't know how to unbind that opening of the text box, doesn't seem to have an entry in the keybindings section. (at least, couldn't find one)

I'm only playing 1-player, so didn't need the social aspects anyway, so the text box is not really wanted here either.

Could you please either accept this bug or tell me how I can bypass it? (e.g. update an .ini or something else to just block the new text box that opens up on enter? sw engineer of 20 years here, can take some pointers)
I just want to retain old pre-1.4 grapple behavior.

As a lefthanded, I'm pretty much set on this key layout, so due to this regression haven't been able to run 1.4 yet.

Thanks!
\Johan 'Eyolas'
I noticed that they have allowed the text box for the emote quick thing on single player, so if you want it changed got the config folder and change text box to something else, in the control settings in game there should be quick grapple, set it there.
 
You're right, they allowed that text box in single-player. That - in combination with its hardcoded behaviour - perfectly describes my problem

Yes, I do want to change it, but .. AFAIK there is no config folder in v1.4.0.5?
C:\Program Files (x86)\Steam\steamapps\common\Terraria has: \content followed by data [\font, \images, \sound]
%USERPROFILE%\Documents\My Games\Terraria has \Players, \ResourcePacks, \Worlds

The config.json in My Games\Terraria seems what you were hinting at , but it contains no 'emote', 'chat', ' text', box', 'social' or anything else hinting at the new text box that gets opened.
..And the only 'Enter' I see was from my grapple.

As such, couldn't change the json to get the behavior I need, text box behaviour really seems hardcoded. To me appears needs more than just a UI frontend changed, but also needs to be put in the JSON there.

Guess I'm still stuck here - appreciate the suggestion though!

edit: Attached config.json for clarity
 

Attachments

  • config.json
    4 KB · Views: 80
Last edited:
if you're a software engineer and you have some real experience with coding in c++ with windows in mind, You'll probably be aware of low level keyboard hooking (ex SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardProc,GetModuleHandle(NULL),0);).

if you use that with KeyboardProc callback, and filter out the virtual keycode 'VK_ENTER' (13 int value), then change the LPARAM's vkCode to some other reserved button before using CallNextHookEx to pass that different keycode to terraria.

here's a snippet of the functions as they sit in one of my projects (with VK_ENTER switched to keycode 216 which is unassigned, you may need to pick an 'obscure' keycode from Virtual Key Codes - Macro Scheduler Knowledge Base if terraria doesn't recognize unassigned keycodes)
Code:
BOOL DO_PAUSE=false, KEYBOARD_PROCESSING=false;
#define Title(s) SetConsoleTitle(s)
LRESULT CALLBACK KeyboardProc( int nCode, WPARAM wParam, LPARAM lParam){
    if(nCode == HC_ACTION){
        if(wParam==WM_KEYDOWN){
        KBDLLHOOKSTRUCT *lpm = (KBDLLHOOKSTRUCT*)lParam;
        cout<<(int)lpm->vkCode<<endl;    
        switch(lpm->vkCode){
            case VK_ENTER:
                if(!DO_PAUSE){
                   lpm->vkCode = 216;
                   lParam = (LPARAM)lpm;
            break;
            case VK_F11:
                if(DO_PAUSE=!DO_PAUSE)Title("paused");
                else Title("running");
            break;
            case VK_F12:
                CallNextHookEx(Hook2,nCode,wParam,lParam);
                exit(0);
            break;
        }
        }
    }
  return CallNextHookEx(Hook2,nCode,wParam,lParam);
}


int main(){
MSG msg;
    Hook2 = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardProc,GetModuleHandle(NULL),0);
    cout << "keyboard processing active\n";
 
    KEYBOARD_PROCESSING=true;
    while(1){
        GetMessage(&msg,NULL,0,0);
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
 
}

Program shuts down when f12 key is pressed, pause keychanging functionality with f11... pause is a workaround.. usually have 2nd thread running the program meat- main thread must always be reserved for input processing or there will be major consequences

also good to note that as long as this program is running (unpaused) neither of your enter keys will work properly (there is no way to distinguish between enter keys without LUA or specialized drivers... in any case too much work...) if you REALLY need an enter key, just use this same process over again to bind some other arbitrary key to VK_ENTER...

didn't test this code, it's possible you'll have to filter out 'WM_BUTTONUP' events aswell to properly keybind.
 
Last edited:
Not really a bug, per se, but this is a known issue. The behaviour for the chat may be changed in a future version. (E.g. allowing you to rebind the chat to another key so you can remap Enter to another command).
 
Not really a bug, per se, but this is a known issue. The behaviour for the chat may be changed in a future version. (E.g. allowing you to rebind the chat to another key so you can remap Enter to another command).

Problem appears more widespread among fellow left handed players.
Issue may interfere with muscle memory in which case it's a cause for frustration.

So as far as known issues go, I sure hope this will be looked at. Guessing it'll make a lot of fellow lefties very happy indeed.


 
Back
Top Bottom