Page 1 of 1

How to get rid of the shift-speedup of zoom?

Posted: 19 Jan 2013, 02:25
by Sprang
Hello!

I have a problem with the speed increase that shift causes in the camera movement (default TA camera). I have unbound "movefast" from shift, and I no longer get the speedup in normal scrolling, but I still get it while holding shift and zooming with mousewheel. Especially when zooming in, shift adds a ginormous modifier to the zoom speed, which causes the slightest nudge of the scrollwheel to plunge my camera straight to dirt.

Anyone know of a way to remove this speedup? All help greatly appreciated.

Re: How to get rid of the shift-speedup of zoom?

Posted: 19 Jan 2013, 11:17
by Silentwings
Did you try binding shift to something else in uikeys? Might have a tonne of unwanted extra effects though.

Re: How to get rid of the shift-speedup of zoom?

Posted: 19 Jan 2013, 14:06
by Beherith
All thanks to zwzsg

Add it as scroll_lock.lua to /luaui/widgets

Code: Select all

function widget:GetInfo()
	return {
		name = "No Alt Mouse Wheel",
		desc = "Eats all your mousewheeling when alt or shift is down",
		author = "zwzsg",
		date = "16 may 2010",
		license = "Free",
		version = 1,
		layer = 2000, -- so that any widget with a lower number has a chance to catch mousewheel first
		enabled = true
	}
end

function widget:MouseWheel(up,value)
	local alt,ctrl,meta,shift=Spring.GetModKeyState()
	if alt or shift then
		return true
	else
		return false
	end
end

Re: How to get rid of the shift-speedup of zoom?

Posted: 19 Jan 2013, 15:43
by Sprang
This looks like an adequate fix. Thanks zwzsg! Thanks Beherith!