[android-components](../../index.md) / [mozilla.components.feature.toolbar](../index.md) / [ToolbarFeature](index.md) / [onBackPressed](./on-back-pressed.md)

# onBackPressed

`fun onBackPressed(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/toolbar/src/main/java/mozilla/components/feature/toolbar/ToolbarFeature.kt#L48)

Overrides [BackHandler.onBackPressed](../../mozilla.components.support.base.feature/-back-handler/on-back-pressed.md)

Handler for back pressed events in activities that use this feature.

**Return**
true if the event was handled, otherwise false.

