input_samplebase(3)
β¨ input_samplebase β¨
okay bestie, so this one's from the Arcan Lua API and it's called input_samplebase β it's literally the function that changes the coordinate system origo for a device π (yes, "origo", that's the word the page uses, we're keeping it π
)
πΈ SYNOPSIS πΈ
nil
input_samplebase( devid, base_x, base_y, base_z )
that's it, that's the whole vibe β nil is the return value, and then the call takes devid, base_x, base_y, and base_z π¦
π DESCRIPTION π
so basically: this is primarily needed for mouse devices when you're working with absolute coordinates coming from a device, in the cases where just offsetting where the cursor is drawn isn't enough π like, the simple fix doesn't always slay.
the maybe-easiest case where you'd need this? when mouse input should be locked to a surface and the internal tracking of the device should be shifted if it tries to go outside said surface π₯ so like, the device keeps its own internal tracking, but you nudge where the origo sits so its coordinates line up with your surface instead of wandering off into the void π no cap, that's the whole point.
π«Ά reminder that the page calls it "primarily needed for mouse devices" β don't go inventing other use cases, i'm just relaying the scrolls πβ¨
π SEE ALSO π
iodevβ the related page, go read it too, iykyk π
and that's a wrap, bestie π this iconic lil page is from iodev, dated October 2026, and it's input_samplebase(3) β periodt ππ
β¨
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms