> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_events/ontabclick.md).

# OnTabClick

The **OnTabClick** event can be implemented by a [script add-in](/directory-opus/manual/scripting/script_add-ins.md) to receive notification when a tab is clicked with a qualifier key held down. You can use this to override the default behavior (e.g. control-clicking tabs normally links them).

| **Method Name:**   | OnTabClick                                                                                                                                                                                                |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Argument Type:** | [**TabClickData**](/directory-opus/manual/reference/scripting_reference/scripting_objects/tabclickdata.md)                                                                                                |
| **Return Type:**   | *bool*                                                                                                                                                                                                    |
| **Description:**   | The **TabClickData.tab** property identifies the tab that was clicked. You can return **True** from this event to prevent the default action, or **False** (which is the default) to allow it to proceed. |
