Key rebinding guide (using AHK)
गाइड
/
Key rebinding guide (using AHK)
अपडेट किया गया 4 months ago से Lusther

Setting up key rebindings can quickly become obnoxious as the complexity and the number increases. In fact, the default rebinding system the game provides turns out to be pretty limited, forcing you to configure extra external tools such as your peripherals software or community ones like XMouse, in case you want to change the behavior of your scroll wheel. That's where AutoHotkey can come into play.

AHK is a scripting tool which enables you to rebind any key you are using, including scroll wheel. It can also be used to lock your cursor within the game window. All of that in one portable script that you can easily start, stop and customize as you wish.

Leveraging rebind through AHK can be daunting, this guide walks you through setting it up while complying with leaderboard rules.

Installation 

Before starting, please install AHK on the following site

The AHK quickstart code is written in version 2.0, please install the corresponding version.

Rules

Before starting, just a quick reminder about rebinding rules.

Custom key bindings are allowed in Ori as long as there is no timing present in the bind. Multiple functions can be bound to the same key, but any kind of “do X, wait 0.1s, do Y” macro is forbidden.

Quickstart code

Provided with this little guide, here is a sample code which can be configured to manage both Cursor Lock and MouseWheel Rebind. The script also provides a template to add your own rebind and multibind.

https://www.speedrun.com/ori_de/resources/n61rd

How to configure your script

The script is written to give you an easy way to rebind your scroll wheel. You can configure the rebind through the MOUSE_WHEEL_UP_BIND_TO and MOUSE_WHEEL_DOWN_BIND_TO variables.

The default resolution is 1920*1080. If you have a different screen resolution, you can modify SCREEN_RES_WIDTH and SCREEN_RES_HEIGHT according to your screen size.

If you are not playing Ori on your main screen, the cursor lock feature may not work correctly.

By default, the script is meant to play with Ori and the Blind Forest: Definitive Edition. If you want to adapt the script to another game or to the vanilla version of the game, you can modify the GAME_NAME variable to fit your need.

This quickstart code will be enough to get you started and you may not need to read the rest of the guide.

Additional Features

Adding a rebind 

The quickstart code includes a template at the end of it, that you can use to create your own rebinds.

Profile Gestion 

Profile Gestion can be handled through AHK but is out of the scope of that quickstart guide.

Nonetheless, here’s some pointers if you want to deep dive into implementing it in your script https://www.autohotkey.com/boards/viewtopic.php?t=43601

Gotchas

When it comes to AHK and rebinding softwares, it can be especially hard to get a grasp of the behavior of the different tools. Here’s a little list of some problems that you could encounter.

Modificators 

Pay attention to how you prefix the key that should be rebound. In most general cases you want to prefix it with a “*” which means it will ignore any modificator.

If the wildcard is forgotten, rebinding might not work when pressing it at the time with other keys such as “Alt”, “Shift”, or “Ctrl”.

Forbidden rebind notation 

While searching on the internet you may encounter a simpler syntax for simple rebinds on AHK.

Button1::Button2

While this syntax might be simpler, it is actually forbidden as it can input multiple presses of the key instead of holding it.

Alt-tabbing while key is held

Pay attention when using rebind together with switching windows.

If you switch windows when one of our rebind is held and release when not on the game, the simulated key will not be released.

Such a behavior should not be exploited to gain any benefit.

If you happen to get this unintentionally, you can usually get rid of the simulated input by pressing your rebind key again.You can also restart the script if that happens.

Cursor Lock on Linux

Cursor Lock is handled in the quickstart code through Windows API call. Hence the current AHK cursor lock function doesn’t work on other operating systems such as any Linux distribution.

गेम विवरण
फॉलोअर्स
978
दौड़
2,338
खिलाड़ियों
283
ताज़ा धागे
पोस्ट किया गया 7 months ago
3 जवाब
पोस्ट किया गया 1 year ago
3 जवाब
पोस्ट किया गया 5 years ago
1 जवाब
पोस्ट किया गया 5 years ago
1 जवाब
पोस्ट किया गया 5 years ago
2 जवाब
पोस्ट किया गया 6 years ago
22 जवाब