GetMouseButtonPress

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

A command for Oblivion Script Extender

Syntax:

(dxScanCode:long) GetMouseButtonPress whichIndex:long

Returns the dx scancode of the mouse button being pressed. If more than one mouse button is pressed, use whichIndex to choose which code to return.

Notes[edit | edit source]

  • Index starts at 0 for the first button being pressed, 1 for the second, etc.
  • This function will pick up mouse buttons disabled using DisableKey.
  • Scancodes for mouse buttons are the numbers 256 to 263, and also 264 and 265 to check for mouse wheel movement.
  • This function will return the scancode of a mouse button for the whole period it is held down, and not just the first frame.
  • If no mouse button are being held down, or if the id you give is greater than the number of mouse buttons being held down, this function will return 65535.
  • This function doesn't return a value while a MessageBox is being displayed, presumably because input is switched over to the MessageBox.

See Also[edit | edit source]