| title | beatMouseDown | ||||||
|---|---|---|---|---|---|---|---|
| sidebar_custom_props |
|
import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'
This event is fired whenever a the user presses the mouse button on a beat.<Signature style="block" js={[["keyword","readonly"],["whitespace"," "],["identifier","beatMouseDown"],["token",":"],["whitespace"," "],["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","Beat","/docs/reference/types/model/beat"],["token",">"],["token",";"]]} csharp={[["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","Beat","/docs/reference/types/model/beat"],["token",">"],["whitespace"," "],["identifier","BeatMouseDown"],["whitespace"," "],["token","{"],["whitespace"," "],["keyword","get"],["token",";"],["whitespace"," "],["token","}"]]} kotlin={[["keyword","val"],["whitespace"," "],["identifier","beatMouseDown"],["token",":"],["whitespace"," "],["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","Beat","/docs/reference/types/model/beat"],["token",">"]]} />
<Tabs defaultValue="javascript" values={[ { label: "JavaScript", value: "javascript"}, { label: "C#", value: "csharp"}, { label: "Android", value: "android"} ]}
```js const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab')); api.beatMouseDown.on((beat) => { startSelectionOnBeat(beat); }); ``` ```cs var api = new AlphaTabApi(...); api.BeatMouseDown.On(beat => { StartSelectionOnBeat(args); }); ``` ```kotlin val api = AlphaTabApi(...) api.beatMouseDown.on { beat -> startSelectionOnBeat(args) } ```