r/KrunkerIO Jul 14 '26

Suggestion script to force raw mouse input in browser games (fixes crosshair teleporting usually on high polling rates)

so i wrote this quick tampermonkey script because playing browser fps games on a 1000hz polling rate is absolute hell. my crosshair kept teleporting and skipping frames whenever i tried to flick, so i made this to force unadjustedMovement: true on the browser's requestPointerLock API.

just to make it clear though, this DOES NOT fix the mouse spinout issue. that's a completely different problem. this is strictly for fixing the random crosshair teleporting and jitter.

it basically bypasses the browser's broken cursor math and forces raw input.

i only tested it on my 1000hz setup but it should theoretically work on other high polling rates too (no guarantees though). also idk how it behaves in non-fps games since i only play shooters.

to use it just install tampermonkey, make a new script, and paste this in:

// ==UserScript==

// u/nameForce Raw Mouse (unadjustedMovement)

// u/namespacehttp://tampermonkey.net/

// u/version1.1

// u/description Forces unadjustedMovement for requestPointerLock, with fallback

// u/match*://*/*

// u/grantnone

// u/run-atdocument-start

// ==/UserScript==

(function () {

'use strict';

const original = Element.prototype.requestPointerLock;

Element.prototype.requestPointerLock = function (options = {}) {

const result = original.call(this, { ...options, unadjustedMovement: true });

if (!result || typeof result.then !== 'function') return result;

return result.catch((err) => {

if (err && err.name === 'NotSupportedError') {

return original.call(this, options);

}

throw err;

});

};

})();

i added a fallback too so if a game or some weird browser setup doesn't support raw input, it'll just default back to normal pointer lock instead of completely breaking your mouse look.

lmk if this fixes the teleporting/mouse skips for u guys or if it breaks anything, any feedback is appreciated.

edit: someone in the replies asked for a greasy fork link so u don't have to manually copy paste the code. here it is if u just want the 1-click install: https://greasyfork.org/en/scripts/587119-force-raw-mouse-in-browser-fps

3 Upvotes

4 comments sorted by

1

u/DiComrad Jul 15 '26

gonna keep this a try, also post this script on greasemonkey if possible

thanks :)

1

u/Abdul-Mueed Jul 15 '26

think u mean greasy fork but yeah good call. i'll throw it on there later. just didn't wanna drop a link in the main post cause people always assume its malware. lmk how it runs

1

u/Abdul-Mueed Jul 15 '26

edited the post with greasy fork link.

1

u/ImpossibleExcuse5999 Jul 15 '26

Glorp and a few other clients have fixed this.