---
title: "Discussion on \"onPreviewKeyEvent vs onKeyEvent on Android TV: A Subtle D-Pad Bug\" | Hashnode"
description: "Discussion on \"onPreviewKeyEvent vs onKeyEvent on Android TV: A Subtle D-Pad Bug\". The bug report was simple: long-pressing the d-pad center button on a channel card should toggle the favorite — it wasn't working reliably. On some devices it fired once and stopped. On others it didn"
url: "https://hashnode.com/posts/onpreviewkeyevent-vs-onkeyevent-on-android-tv-a-subtle-d-pad-bug/6a639fc13483d73880ec4d2b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [onPreviewKeyEvent vs onKeyEvent on Android TV: A Subtle D-Pad Bug](https://akshaynikhare.hashnode.dev/onpreviewkeyevent-vs-onkeyevent-on-android-tv-a-subtle-d-pad-bug?utm_source=hashnode&utm_medium=feed)

The bug report was simple: long-pressing the d-pad center button on a channel card should toggle the favorite — it wasn't working reliably. On some devices it fired once and stopped. On others it didn

Jul 24 · 4 min read · akshaynikhare.hashnode.dev  
Read the article

-   [#android-tv](https://hashnode.com/tag/android-tv)
-   [#jetpack-compose](https://hashnode.com/tag/jetpack-compose)
-   [#kotlin](https://hashnode.com/tag/kotlin)
-   [#android](https://hashnode.com/tag/android)
-   [#input-handling](https://hashnode.com/tag/input-handling)

## Written by

[akshay Nikhare](https://hashnode.com/@akshaynikhare)

@akshaynikhare

  
[View profile](https://hashnode.com/@akshaynikhare)

Full Stack Developer | Angular & Vue.js Specialist | Shopware 6 & Product Design Enthusiast

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
