Instant spell switching AHK macro script

by Micchannn·vv1.2·Updated 2025-12-16

Provides 16 different hotkeys for all 16 available spell slots. A very simple AHK script that allows you to cast all spells in a 4-row spell combo with one keystroke, without having to press the spell combo key +1/2/3/4.

Screenshots 1 screenshots

About this mod Machine translation

Provides 16 different hotkeys for all 16 available spell slots. A very simple AHK script that allows you to cast all spells in a 4-row spell combo with one keystroke, without having to press the spell combo key +1/2/3/4.

Instant spell switching AHK macro script

🎮 **Say goodbye to tedious operations and release magic with one click! **

In "Legacy of Hogwarts", casting spells in different spell combinations usually requires two steps: first press `F2` (or switch up and down) to select the spell combination, and then press `1` to cast the first spell in the combination. If you want to switch back to the spell combination 1, you have to press `F1` and then `1`... The battle rhythm is instantly disrupted!

💡 **This script changes everything! **

Now, you can cast the first spell of Combination 2 directly by pressing the **`** key, and cast the first spell of Combination 1 by pressing the **`1`** key, completely skipping the step of pressing `F1`/`F2` or scrolling the mouse wheel to switch combinations!

**✨ Core advantage: Condensing two key operations into one! **

---

🎯 Function and key mapping

This script assigns independent shortcut keys to all 16 spell slots (4 combinations x 4 spells), allowing you to cast spells smoothly like a real wizard!

**The default key mapping is as follows:**

| The key you pressed | The actual operation performed (in-game) | The corresponding spell slot |

|:--- |:--- |:--- |

| **1** | F1 + 1 | Combo 1, Spell 1 |

| **2** | F1 + 2 | Combo 1, Spell 2 |

| **3** | F1 + 3 | Combo 1, Spell 3 |

| **4** | F1 + 4 | Combo 1, Spell 4 |

| **`** | F2 + 1 | Combo 2, Spell 1 |

| **5** | F2 + 2 | Combo 2, Spell 2 |

| **6** | F2 + 3 | Combination 2, Spell 3 |

| **7** | F2 + 4 | Combo 2, Spell 4 |

| **R** | F3 + 1 | Combo 3, Spell 1 |

| **T** | F3 + 2 | Combo 3, Spell 2 |

| **Mouse side button 1 (back)** | F3 + 3 | Combo 3, Spell 3 |

| **Mouse side button 2 (forward)** | F3 + 4 | Combo 3, Spell 4 |

| **F1** | F4 + 1 | Combo 4, Spell 1 |

| **F2** | F4 + 2 | Combo 4, Spell 2 |

| **F3** | F4 + 3 | Combo 4, Spell 3 |

| **F4** | F4 + 4 | Combo 4, Spell 4 |

**⚠️ IMPORTANT NOTE: ** You need to rebind **Revelio** and **Spell Select Keys (F1-F4)** in-game to avoid conflicts. The script requires two additional side mouse buttons by default, but you can definitely rebind them to other buttons by following the tutorial below!

---

🛠️ Installation and Customization

**Step 1: Install AutoHotkey (AHK)**

  • Download and install AutoHotkey v1 (this script is based on v1 version).

**Step 2: Understand and modify the script**

The principle of the script is very simple, it is to simulate continuous key presses. For example, the following code defines that when you press the `1` key, the script will automatically press `F1` and `1` in sequence:

```ahk

*1::; This is the key you want to press, this example is a macro that casts spell 1 in combo 1

Send, {F1}; simulates pressing the spell combination 1 key (F1)

Sleep, 10; wait 10 milliseconds

Send, {1}; simulates pressing the cast spell 1 key (1)

return

```

  • **Modify keys:** Just replace the `1` in `*1::` in the first line with the key you want to use.
  • **Reference Document:**
  • AutoHotkey key list
  • The key name of the Send command

**Step 3: For non-QWERTY keyboard layouts (such as AZERTY)**

For other keyboard layouts, you need to use Scan Codes to ensure accurate keystrokes. For example:

  • **`** key = `SC029`
  • **1** key = `SC002`
  • **2** key = `SC003`

-... and so on.

Complete versions of these layouts are included in the script, you just need to select the corresponding script file.

---

🎨 Spell layout inspiration

See how other players use this macro to optimize their battle layouts!

**My personal layout:**

**Spell combinations by color:**

---

🎥 Practical demonstration

Want to see how smooth it is in actual gaming? Watch the demo video:

(The video link has been integrated, please view it on the original Mod page)

---

📜 Complete …

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
  3. Place the files exactly as the readme says; mods with listed dependencies need those installed too.
  4. Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.

Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.

File & checksum

Filename
Instant Spell Switching for Other Keyboard Layouts
File size
824.2 KiB