Computer Science, asked by vishvasminj5, 8 months ago

Mouse down event takes place when you:
A. Click the left mouse button
B. Press the mouse button
C.
Mouse is moved over the control
D. All of the above.​

Answers

Answered by maheshbabu748
2

Answer:

c

Explanation:

vsrtyg5rvytrin3rnuc8j74tn98vt43jvu89tj98utvj2938gr3jo87 g4

Answered by Dhiksha810
1

Answer:

this chapter we’ll get into more details about mouse events and their properties.

Please note: such events may come not only from “mouse devices”, but are also from other devices, such as phones and tablets, where they are emulated for compatibility.

Mouse event types

We’ve already seen some of these events:

mousedown/mouseupMouse button is clicked/released over an element.mouseover/mouseoutMouse pointer comes over/out from an element.mousemoveEvery mouse move over an element triggers that event.clickTriggers after mousedown and then mouseup over the same element if the left mouse button was used.dblclickTriggers after two clicks on the same element within a short timeframe. Rarely used nowadays.contextmenuTriggers when the right mouse button is pressed. There are other ways to open a context menu, e.g. using a special keyboard key, it triggers in that case also, so it’s not exactly the mouse event.

…There are several other events too, we’ll cover them later.

Events order

As you can see from the list above, a user action may trigger multiple events.

For instance, a left-button click first triggers mousedown, when the button is pressed, then mouseup and click when it’s released.

In cases when a single action initiates multiple events, their order is fixed. That is, the handlers are called in the order mousedown → mouseup → click.

Click the button below and you’ll see the events. Try double-click too.

On the teststand below all mouse events are logged, and if there is more than a 1 second delay between them they are separated by a horizontal ruler.

Also we can see the button property that allows to detect the mouse button, it’s explained below.

 

Mouse button

Click-related events always have the button property, which allows to get the exact mouse button.

We usually don’t use it for click and contextmenu events, because the former happens only on left-click, and the latter – only on right-click.

From the other hand, mousedown and mouseup handlers we may need event.button, because these events trigger on any button, so button allows to distinguish between “right-mousedown” and “left-mousedown”.

The possible values of event.button are:

Button stateevent.buttonLeft button (primary)0Middle button (auxiliary)1Right button (secondary)2X1 button (back)3X2 button (forward)4

Most mouse devices only have the left and right buttons, so possible values are 0 or 2. Touch devices also generate similar events when one taps on them.

Also there’s event.buttons property that has all currently pressed buttons as an integer, one bit per button. In practice this property is very rarely used, you can find details at MDN if you ever need it.

Similar questions