A lightweight Windows utility to fix Minecraft Bedrock Edition's 1.21.121 mouse cursor escaping issues by keeping it confined to the game window.
This program automatically clips your mouse cursor to the Minecraft Bedrock window when the game is focused, preventing the cursor from escaping to other monitors or areas of your screen during gameplay. Works in both fullscreen and windowed modes!
- Download the latest release from the Releases page.
- Extract the
.exefile to a folder of your choice. - Run
SwimMouseCursor.exe - Microsoft C++ Runtime Installer if needed
- Simply run the program and launch Minecraft Bedrock.
- Your cursor will automatically be confined to the Minecraft window when it's focused.
- The program runs in the background with a console window showing status updates.
- Configurable Key (default:
E) - Recenter cursor to middle of window, intended for your in-game inventory keybind. - Escape - Also recenters cursor, such as when opening a pause menu.
- Ctrl+Shift+C - Toggle cursor clipping on/off.
The program will create a config.txt file on first run. You can edit this file to change the recenter key to any supported key:
Supported Key Formats:
- Single letters:
AthroughZ - Number keys:
0through9 - Function keys:
F1throughF12 - Special keys:
TAB,SPACE,ENTER,ESC,BACKSPACE,DELETE, etc. - Arrow keys:
LEFT,RIGHT,UP,DOWN - Modifier keys:
SHIFT,CTRL,ALT(and their left/right variants) - Numpad keys:
NUMPAD0throughNUMPAD9 - Virtual key names:
VK_TAB,VK_SPACE,VK_F1, etc.
Case insensitive - TAB, tab, and Tab all work!
If Windows Defender or your antivirus software blocks the program:
-
Windows Defender SmartScreen:
- Click "More info" when the warning appears
- Click "Run anyway"
-
Antivirus Software:
- Add an exception for the program in your antivirus settings.
- The program uses low-level keyboard hooks and mouse cursor manipulation, which can trigger false positives.
Why does this happen? The program uses Windows API hooks to monitor keyboard input and control the cursor, which are techniques sometimes used by malware. This is a false positive - the source code is available for review.
Solution: Run the program as Administrator
- Right-click on
SwimMouseCursor.exe - Select "Run as administrator"
- This gives the program the necessary permissions to hook into system-level events.
If you get an error like "The code execution cannot proceed because MSVCP140.dll was not found" or similar:
Solution: Install Microsoft Visual C++ Redistributable
- Download from Microsoft: VC++ Redistributable Latest
- Run the installer
- Restart your computer
- Try running the program again
If you see [!] Invalid key name in config in the console:
- Check that your key name is spelled correctly in
config.txt - Refer to the supported keys list above
- The program will default to 'E' if an invalid key is specified
- Make sure the program is running (check for the console window)
- Verify Minecraft Bedrock is the focused window
- Check that clipping is enabled (should say "ENABLED" in console)
- Try pressing the recenter hotkey (default: E)
- If all else fails, press
Ctrl+Shift+Cto toggle clipping off and on again
- ✅ Automatic cursor clipping when Minecraft is focused
- ✅ Works in fullscreen AND windowed modes
- ✅ Non-intrusive hotkey system (doesn't consume keypresses)
- ✅ Extensive configurable recenter key support (letters, numbers, function keys, special keys)
- ✅ Safety toggle to disable clipping
- ✅ Minimal CPU usage/overhead
- ✅ Clean console interface with status updates
- ✅ Intelligent window detection (only clips when Minecraft is truly visible and topmost)
Created by Swedeachu
- This program is designed specifically for Minecraft Bedrock Edition (Windows 10/11).
- The program must remain running in the background while you play.
- Close the program or use
Ctrl+Shift+Cto release the cursor when done playing. - The recenter hotkey does NOT consume the keypress - it passes through to Minecraft.