nikita36078 / J2ME-Loader

A J2ME emulator for Android.
Apache License 2.0
1.72k stars 195 forks source link

since 1.7.2 update hardware keyvoard dose not work correctly anymore #830

Open nanderer opened 2 years ago

nanderer commented 2 years ago

Emulator version: 1.7.2

Game version: applyes to all games that worked before

Game resolution: (For example, 240x320 or 640x360) applyes to all resolutions

Device: BlackBerry key2 BBE100-4

Android version: 8.1.0

Description of the issue: since i updated to the latest j2me-loader version it seams like you are not accessing the keyboard input in the same way as before. i was allways very satisfied with the way it worked, switched off on screen keyboard and programmed the number keyboard on the left side of the BlackBerry hardware keyboard as the emulator numbers and the dpad and soft buttons on the right keyboard to be able to use j2me apps like in the old days...

so what worked before:

i could press and hold a button on the keyboard and this keyevent was forwarded to all the software perfectly, now if i press and hold the button it is not forwarded as an continues press but as short press and release events

so gameplay became for most games unusable

please add a way to revert to the old way of input handling,

thanks in advance and keep up the good work

nikita36078 commented 2 years ago

Could you test this version, will it work or not?

nikita36078 commented 2 years ago

@nanderer Any updates?

RibShark commented 1 year ago

I am also having this issue, the version posted does not fix it. I am testing on Windows Subsystem for Android, and it is acting as if I am typing the letters (so double pressing a key produces a key-down event, then the 2nd key press is delayed for a second as if I were holding the key in a textbox). Controller input works fine, and this is even effected by the system keyboard settings (turning up the repeat delay for the keyboard makes the key press even more delayed in J2ME Loader.

1.7.0 is the last version that works properly, 1.7.1 and above all have this bug. I assume that https://github.com/nikita36078/J2ME-Loader/commit/6b41245e634e37ac120881d0f6e1d1dc306a18ac is the commit that introduced the issue.

RibShark commented 1 year ago

https://github.com/nikita36078/J2ME-Loader/blob/8717a985795fa88775781013691ab62c068102af/app/src/main/java/javax/microedition/lcdui/Canvas.java#L922 I believe this switch statement is at fault, I do not believe that it is intended to fallthrough, so the breaks are missing.

mrGoner commented 1 year ago

Hello, I've got BlackBerry KeyOne with qwerty keyboard and faced with same issue. Version 1.7.0 works fine. Ready to help with problem detecting and testing

Loplaus555 commented 3 months ago

For the keyone, the default blackberry keyboard needs to be swapped. I think I downloaded and switched to anykey it worked fine. Game: Prince of persia by gameloft.

nanderer commented 3 months ago

@Loplaus555 that cant be the solution, other apps like my GBA emulator also work fine without changing the keyboard software, i guess staying with 1.7.0 is a good thing to do for me...

Loplaus555 commented 3 months ago

@nanderer That was the only thing that worked for the keyone at least. The stock keyboard doesn't mess with any other emulators for me either. Only j2me loader and the mod