• Guide
  • Plans
  • Download
  • Dashboard

Record macros, write Lua scripts and bind any key or mouse button on Windows - any game, any keyboard, any mouse. Download and try it free.

Download for Windows

Product

  • Guide
  • Plans & Pricing
  • Account

Games

  • Minecraft
  • ROB RUN
  • AION 2
  • Roblox
  • GTA 5 / FiveM
  • All Games

Learn

  • Build your first macro
  • Bind a macro to a button
  • Use it in a game
  • The commands you'll use most

Legal

  • Privacy Policy
  • Terms of Service
  • Site Map

© 2026 BUFFKEY. All rights reserved.

Windows 10 and 11 · PC Software

  1. Home
  2. Games
  3. Minecraft
Updated November 19, 2026

Minecraft Macros, Scripts & Key Binds

Minecraft macros for building, mining, and farms - with example command lists you can rebuild in a minute.

Download BuffKeyStart the 3-day trial

Minecraft rewards patience, and much of the repetition in it is not a fight: laying a floor, refilling a hotbar, or running the same farm loop for the twentieth time is exactly the kind of work BuffKey was built to absorb.

This page covers a setup that works with Java and Bedrock on Windows, three example macros you can rebuild in a minute, and the timing tweaks that stop a building macro from dropping blocks.

Nothing here needs mods, a modified game, or a special launcher. BuffKey sends key presses and mouse clicks to whichever window is active, so Minecraft sees the same input it would from your keyboard.

Where a macro actually helps in Minecraft

The useful cases are all about repetition, not decisions. A building macro can cycle a palette, place a block, and step back so the next block lands in line. A hotbar macro can swap food, blocks, and tools in the same order every time. A storage macro can walk the same chest route when you unload after a mining trip.

In a single-player world, a harvest or fishing macro quietly removes a chore: you set the rhythm once and get your hands back. Creative building is the other obvious win - large floors, walls, and roofs are the same four inputs repeated for twenty minutes, and a macro turns that into one press.

Java, Bedrock, and custom launchers

BuffKey does not care which edition you run. If the game window accepts normal Windows input, a macro can send it. Java and Bedrock both work, and so do modpacks, custom launchers, and shader setups, because BuffKey sits outside the game rather than inside it.

The practical detail is window focus. Run the game windowed or borderless-windowed so the input lands where you expect, and keep one profile per world so a creative palette macro never fires in survival.

See how to use a macro in a game

How to set up a Minecraft macro

These are the same tabs and buttons described in the guide. Ten minutes gets you a working binding.

Create a Minecraft profile

Open BuffKey, go to the Macros tab, and name a profile for the world you are building in. A separate profile for creative and survival keeps your binds from overlapping.

Record the repetitive part once

Press Record, perform the sequence slowly, then stop. The recorder captures a rough draft; you will tighten the timing by hand in the next step.

Add a Sleep after every world action

Double-click each Sleep command and set it to 100–250 ms. Minecraft processes input on a tick, so a macro that clicks faster than the game can place blocks will drop actions.

Bind it to a spare mouse button

Open the Bindings tab, click the button you want, set Action to macro, and choose the macro. Use click for a single pass and hold only for loops that are safe to repeat.

Test in a flat creative world

Press Test (F7) with the game focused, fix any missed clicks, then press Activate (F8) when you are happy. F11 stops everything immediately.

Minecraft macro examples

These are the combos people ask for most. Rebuild them in the macro editor, then adjust the pauses to your PC - each one is a plain command list, no scripting required.

Auto Clicker

An auto clicker in three commands: one left click, a very short pause, and a loop. Bind it to hold and it repeats while the button is down; bind it to click and you get a fixed burst.

Mouse Click (left) - attack
Sleep 10 ms
Loop 40

Two things worth knowing before you tune it. Once the loop runs faster than the game can register, extra clicks are dropped rather than queued - raise the Sleep if the count feels short. And modern Minecraft gives each attack a cooldown, so more clicks do not mean more damage; this pattern is for older-style combat and for menus that reward rapid clicking.

Auto Anchor

Anchor PvP is a hotbar dance: place the anchor, charge it with one glowstone, swap to your sword, and trigger the blast. The macro does all of it in one press, so your hand stays on the mouse and your eyes stay on the other player.

Swap the three slot keys for whatever your hotbar uses - the order matters, the keys are placeholders.

Key 1 - respawn anchor
Mouse Click (right) - place
Sleep 30 ms
Key 2 - glowstone
Mouse Click (right) - charge
Sleep 30 ms
Key 3 - sword
Mouse Click (right) - detonate

Every step gets one short pause. Below roughly 25 ms the client starts dropping hotbar swaps, and a dropped swap means the glowstone goes into the wrong hand and the anchor stays dark. Keep it on a click binding rather than hold - one press per anchor.

Spear Boost

A spear with the dash enchantment can cover ground fast, and this macro fires the sequence around it: one click, swap to the spear, swap straight back to a low-cooldown item. Written for Minecraft 1.21.11.

It only works if the bar is set up the way the macro expects, so check these first:

  • Slot 2 holds your hand or an item with a short cooldown.
  • Slot 7 holds the spear, enchanted with the dash enchantment.
  • Stand on slot 2 before you press the macro button.
Mouse Click (left) - attack
Key 7 - spear
Sleep 64 ms
Key 2 - back to slot 2

The 64 ms between the two swaps is the part that matters - the source macro's 1 ms delays are effectively "no pause", and BuffKey's own command overhead covers them. Keep the binding on click: the sequence is meant to fire once per press, not loop.

Auto Cart

A cart PvP bind: place a rail, then drop a minecart on it, in the middle of holding a bow. Set rails to slot 3 and the minecart to slot 1, draw the string, and press the button.

Key 3 - rails
Mouse Click (right) - place rail
Sleep 30 ms
Key 1 - minecart
Mouse Click (right) - place cart

Both actions are right-clicks, so keep the crosshair on the ground before you press - a rail placed in mid-air does nothing, and the cart has nothing to land on. The two 30 ms pauses keep the hotbar swap and the second placement from racing each other; if the cart refuses to sit, raise them rather than lowering them.

Stun Slam

The hotbar half of the stun slam: swap to the item in slot 8, then to the one in slot 2. Two key presses, no clicks - the timing between them is the whole macro.

Key 8 - first item
Sleep 25 ms
Key 2 - second item

Put whatever the combo needs into slots 8 and 2 and leave the rest alone. If the second swap feels late, trim the Sleep; if it does not register at all, raise it - a missed swap is a dropped combo, and it is easier to feel than to see.

Scripts (Lua) for Minecraft

Lua is optional in BuffKey. For Minecraft, the useful scripts are counters and guards rather than anything clever in combat: place a wall segment twenty times, stop when a counter reaches zero, or add a small random pause between placements so the rhythm is not perfectly mechanical.

If you have never written Lua, the macro editor covers the same ground for short sequences. Reach for a script when the sequence needs to count, branch, or repeat a block of commands without duplicating them by hand.

Learn the macro basics first

Key binds & remaps for Minecraft

Put building macros on a mouse side button and keep mining on a hold binding. Avoid the keys Minecraft already uses for movement, hotbar slots, drop, and perspective - overlapping a game bind is the most common reason a macro appears to do nothing.

If Minecraft is running as administrator, BuffKey needs the same permission level. Keep one profile for survival and one for creative so a palette macro never fires in the wrong world.

How bindings work in BuffKey

On this page

  • Where a macro actually helps in Minecraft
  • Java, Bedrock, and custom launchers
  • How to set up a Minecraft macro
  • Minecraft macro examples
  • Scripts (Lua) for Minecraft
  • Key binds & remaps for Minecraft

Minecraft FAQ

What can I automate in Minecraft with BuffKey?+

Building runs, hotbar swaps, storage routes, and fishing loops in your own world. Anything that is a fixed sequence of keys and clicks is a macro: place a block, step back, swap a tool, open a chest.

Can I make an auto clicker in Minecraft with BuffKey?+

Yes. Add a Mouse Click, follow it with a short Sleep, and wrap the pair in a Loop. Use a hold binding for a clicker that runs while the button is down, or a click binding for a fixed burst of clicks.

Does BuffKey work with both Java and Bedrock?+

Yes. BuffKey sends normal Windows key presses and mouse clicks to the active window, so it works with either edition on Windows. It does not need mods, a modified launcher, or a specific version of the game.

Does it work with modpacks and custom launchers?+

It does. BuffKey sits outside the game, so the launcher, modpack, or shader setup does not matter - if the window accepts normal keyboard and mouse input, a macro can send it.

Can I write Lua scripts for Minecraft?+

Yes. Lua is optional and best used for counters and repeated build sections: place a wall segment twenty times, stop when a counter reaches zero, or add a small random pause between placements.

Do I need to run BuffKey as administrator?+

Only if Minecraft is running elevated. Windows blocks input from a normal-privilege app to an elevated game window, so both need the same permission level.

Next

Set it up in BuffKey

The guide covers the recorder, command list, and bindings. The plans page covers the trial and licensing.

  • Build your first macro

    Install, activate, add commands, test, and save - with the exact button names.

  • Bind a macro to a button

    Choose click or hold, avoid key conflicts, and keep a profile per game.

  • The commands you'll use most

    Key, Mouse Click, Sleep, Loop - what each one does and when to reach for it.

Related

More games

The same recorder and bindings work in every title here. Pick the one you play.

  • ROB RUN

    ROB RUN macros and key binds for menus, inventory, base building, and recoil control - with example command lists you can rebuild in minutes.

    ROB RUN macros
  • Roblox

    Roblox macros and key binds for clicker loops, anti-AFK movement, and wallhop camera flicks - with example command lists you can rebuild.

    Roblox macros
  • GTA 5 / FiveM

    GTA 5 and FiveM macros for RP jobs, crafting, and inventory - with example command lists you can rebuild per server.

    GTA 5 / FiveM macros

Try it free

Three days. Every feature.

Download BuffKey, start the trial and build a macro in the time it takes to read the quick-start page. No card needed.

Windows 10 and 11 · one PC per license · cancel any time

Download for WindowsSee plans & pricing