Garry's Mod Wiki

MOUSE

Description

Enumerations used by:

It's also part of the BUTTON_CODE enum.

Catch mouse wheel

You can catch the mouse wheel's value by:

local testVal = 0 hook.Add("InputMouseApply", "testMouseWheel", function(cmd, x, y, ang) testVal = testVal + cmd:GetMouseWheel() * 2 --any scale number you want to use print(testVal) end)

Values

MOUSE_FIRST107First mouse button
MOUSE_LEFT107Left mouse button
MOUSE_RIGHT108Right mouse button
MOUSE_MIDDLE109Middle mouse button, aka the wheel press
MOUSE_4110Mouse 4 button ( Sometimes, mouse wheel tilt left )
MOUSE_5111Mouse 5 button ( Sometimes, mouse wheel tilt right )
MOUSE_WHEEL_UP112Mouse wheel scroll up
MOUSE_WHEEL_DOWN113Mouse wheel scroll down
MOUSE_LAST113Last mouse button
MOUSE_COUNT7Mouse button count