I'm using Lua at the moment. Try this code in the editor. Holding down a mouse button (1,2 or 3 doesn't matter) results in this.
require("Scripts/constants/collision_const")
require("Scripts/constants/engine_const")
require("Scripts/LinkedList")
require("Scripts/filesystem")
require("Scripts/math/math")
--Variables
dx=0.0
dy=0.0
camerapitch=0.0
camerayaw=0.0
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2)
FlushKeys()
FlushMouse()
local camera = fw.main.camera
currentY = MouseY()
--main function
while KeyHit(KEY_ESCAPE)==0 do
--Camera look
gx=Round(GraphicsWidth()/2)
gy=Round(GraphicsHeight()/2)
dx=Curve((MouseX()-gx)/8.0,dx,3.0/AppSpeed())
dy=Curve((MouseY()-gy)/8.0,dy,3.0/AppSpeed())
MoveMouse(gx,gy)
camerapitch=camerapitch+dy
camerayaw=camerayaw-dx
camerapitch=math.min(camerapitch,75)
camerapitch=math.max(camerapitch,-75)
fw.main.camera:SetRotationf(camerapitch,camerayaw,0,1)
--Check for mouse up or down
centerY= MouseY()
mouseDifference = centerY - currentY
fw:Update()
--get the current Mouse Y position
currentY = MouseY()
fw:Render()
SetBlend(1)
DrawText("currentY",0,20)
DrawText(currentY,0,40)
DrawText("centerY",0,60)
DrawText(centerY,0,80)
DrawText("mouseDifference",0,100)
DrawText(mouseDifference,0,120)
SetBlend(0)
Flip(0)
end