Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useKeyboardHandler duplicates events #753

Open
Yuri-Oliferchuk opened this issue Jan 11, 2025 · 2 comments
Open

useKeyboardHandler duplicates events #753

Yuri-Oliferchuk opened this issue Jan 11, 2025 · 2 comments
Assignees
Labels
🤖 android Android specific 🐛 bug Something isn't working

Comments

@Yuri-Oliferchuk
Copy link

When I use useKeyboardHandler on Android, it exhibits strange behavior: the handler duplicates events. On iOS, everything works as expected.

  • Device: Android
  • RN version: 0.76.5
  • Library version: 1.15.2

console.log('init');
useKeyboardHandler(
{
onStart: e => {
'worklet';
console.log('START');
},
onMove: e => {
'worklet';
console.log(e.height);
},
onEnd: e => {
'worklet';
console.log('END');
},
},
[],
);

LOGS:
(NOBRIDGE) LOG init
(NOBRIDGE) LOG START
(NOBRIDGE) LOG START
(NOBRIDGE) LOG 0
(NOBRIDGE) LOG 0
(NOBRIDGE) LOG 0
(NOBRIDGE) LOG 0
(NOBRIDGE) LOG 32.3636360168457
(NOBRIDGE) LOG 32.3636360168457
(NOBRIDGE) LOG 61.818180084228516
(NOBRIDGE) LOG 61.818180084228516
(NOBRIDGE) LOG 96.36363983154297
(NOBRIDGE) LOG 96.36363983154297
(NOBRIDGE) LOG 122.18181610107422
(NOBRIDGE) LOG 122.18181610107422
(NOBRIDGE) LOG 144
(NOBRIDGE) LOG 144
(NOBRIDGE) LOG 178.18182373046875
(NOBRIDGE) LOG 178.18182373046875
(NOBRIDGE) LOG 213.4545440673828
(NOBRIDGE) LOG 213.4545440673828
(NOBRIDGE) LOG 230.18182373046875
(NOBRIDGE) LOG 230.18182373046875
(NOBRIDGE) LOG 242.5454559326172
(NOBRIDGE) LOG 242.5454559326172
(NOBRIDGE) LOG 248.72727966308594
(NOBRIDGE) LOG 248.72727966308594
(NOBRIDGE) LOG 253.4545440673828
(NOBRIDGE) LOG 253.4545440673828
(NOBRIDGE) LOG 257.81817626953125
(NOBRIDGE) LOG 257.81817626953125
(NOBRIDGE) LOG 261.81817626953125
(NOBRIDGE) LOG 261.81817626953125
(NOBRIDGE) LOG 265.4545593261719
(NOBRIDGE) LOG 265.4545593261719
(NOBRIDGE) LOG 268
(NOBRIDGE) LOG 268
(NOBRIDGE) LOG 271.2727355957031
(NOBRIDGE) LOG 271.2727355957031
(NOBRIDGE) LOG 273.4545593261719
(NOBRIDGE) LOG 273.4545593261719
(NOBRIDGE) LOG 275.2727355957031
(NOBRIDGE) LOG 275.2727355957031
(NOBRIDGE) LOG 277.4545593261719
(NOBRIDGE) LOG 277.4545593261719
(NOBRIDGE) LOG 278.9090881347656
(NOBRIDGE) LOG 278.9090881347656
(NOBRIDGE) LOG 280.3636474609375
(NOBRIDGE) LOG 280.3636474609375
(NOBRIDGE) LOG 281.0909118652344
(NOBRIDGE) LOG 281.0909118652344
(NOBRIDGE) LOG 282.18182373046875
(NOBRIDGE) LOG 282.18182373046875
(NOBRIDGE) LOG 282.9090881347656
(NOBRIDGE) LOG 282.9090881347656
(NOBRIDGE) LOG 283.2727355957031
(NOBRIDGE) LOG 283.2727355957031
(NOBRIDGE) LOG 283.6363525390625
(NOBRIDGE) LOG 283.6363525390625
(NOBRIDGE) LOG 283.6363525390625
(NOBRIDGE) LOG 283.6363525390625
(NOBRIDGE) LOG 284
(NOBRIDGE) LOG 284
(NOBRIDGE) LOG END
(NOBRIDGE) LOG END

@kirillzyusko
Copy link
Owner

@Yuri-Oliferchuk which Android version do you use?

@Yuri-Oliferchuk
Copy link
Author

Yuri-Oliferchuk commented Jan 11, 2025

XIAOMI Redmi Note 10 pro
MIUI 14.0.8
Android API 33

Emulator with API 35 - has the same behaviour

@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🤖 android Android specific labels Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Android specific 🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants