Garry's Mod Wiki

MOUSE

Description

Enumerations used by:

It's also part of the Enums/BUTTON_CODE.

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

Page Links


Special Pages


Wikis

?

Render Time: 35ms

DB GetPage 3
Generate Html 3
SaveChanges (1) 15
Render Body 0
Render Sidebar 11