batocera-linux / batocera.linux

batocera.linux
https://batocera.org
Other
1.94k stars 497 forks source link

[V33] [x86_64] Keyboard issue #5664

Closed joishere closed 2 years ago

joishere commented 2 years ago

Hello,

On V33 x86/64, with Libretro cores, the physical keyboard does not work on emulated computers. Normally, you just press the "Scroll Lock" key to switch to "Game focus on" mode and the keyboard is usable. It works in V32. In V33, "Scroll lock" switches well but the keyboard does not work.

joishere commented 2 years ago

Tested on a pi400, the problem does not appear (just had to remap the game focus key)

joishere commented 2 years ago

It seems that the bug is related to Retroarch. I replaced the executable by the one of Batocera v32 and the bug is fixed : until next reboot, the buggy file is restored..

BBFrileux commented 2 years ago

Hello, What is the file that needs to be replaced exactly? Can you give its name and where it is located in the arborecence? Thanks for your help.

joishere commented 2 years ago

Replace the file /usr/bin/retroarch (make a copy before) If you don't want to do this at each reboot, you need to enter the command after the copy :

batocera-save-overlay

But be aware that the introduction of an old file can cause bugs (for the moment it works well for me).

BBFrileux commented 2 years ago

Thank you for answering me, it's really nice. For information I'm french so I write via google translation :) Can you tell me where I can find the old version of Retroarch? For the instruction "batocera-save-overlay" it's a command that I can do using WinSCP software for example via a terminal, right? Thanks for your help.

joishere commented 2 years ago

Thank you for answering me, it's really nice. For information I'm french so I write via google translation :) Can you tell me where I can find the old version of Retroarch? For the instruction "batocera-save-overlay" it's a command that I can do using WinSCP software for example via a terminal, right? Thanks for your help.

J'ai installé la v32 sur une autre clé USB ce qui m'a permis de récupérer l'exécutable /usr/bin/retroarch La commande tu peux la taper directement dans un terminal après avoir fait la copie (dans le gestionnaire de fichiers (F1), "Outils/Ouvrir le dossier actuel dans un terminal") Tu tapes la commande et ensuite la commande "exit" pour sortir).

BBFrileux commented 2 years ago

Francais aussi ?? ou google trad? Merci de ta réponse....Le fichier que je remplace c'est bien celui qui s'appelle retroach ( d'ailleur il est tous seul) et qui fait 11Mo a peu près ?? ( je te demande cela car il n'y a pas d'extension).

joishere commented 2 years ago

Oui français aussi. C'est bien ce fichier, il n'a pas d'extension.

Dr-Clownerie commented 2 years ago

Hi, While I'm not French I at least understood that last exchange. :) Thank you for posting this! I've been experiencing the same problem for a while and just stumbled upon your post.

joishere commented 2 years ago

Still broken in V34 beta (batocera-x86_64-34-20220319 - retroarch 1.10.0)

nadenislamarre commented 2 years ago

a new one with ra updated is coming today

joishere commented 2 years ago

a new one with ra updated is coming today

Not better, but I see Retroarch is releasing a new version 1.10.2, in the changelog I see : "INPUT/MAPPING: Fix keyboard device remap nulling" Maybe...

BBFrileux commented 2 years ago

Bon en ce qui me concerne changer le fichier est pire même apres avoir mit le batocera-save-overlay j'ai aucun jeux qui se lance....je l'ai fait sur un batocera tout propre, et ce sont les jeux installé d'origine qui ce lance pas....meme les jeux amtrad ne ce lancent pas....une idée?? Qu'est ce que j'ai mal fait ??

dazzyb2k3 commented 2 years ago

Exactly the same issue here. Since V32 physical keyboards no longer function within libretro emulated computers. Currently running the V34 beta and no change. Would love this to be fixed please.

Nash35400 commented 2 years ago

Bonjour +1 pour moi aussi... J espère que la V34 soignera ce problème.. Merci

jmaneyrol69 commented 2 years ago

Bonjour, +1 pour moi, reproduit sur PC (x86-64, v33)


Hi, +1 for me; reproduced on PC (x86_64, v33)

joishere commented 2 years ago

Hello, The problem is still present in the latest beta (batocera-x86_64-34-20220425). I tried to warn the developers on Discord, without success.

lbrpdx commented 2 years ago

Works with me on x86_64 v34 beta 20220429. Can anyone confirm and close, please?

joishere commented 2 years ago

Works with me on x86_64 v34 beta 20220429. Can anyone confirm and close, please?

Sorry lbrpdx, it does not work for me :-(

Désolé lbrpdx, ça ne fonctionne pas chez moi. Un test simple : le remapping d'une touche dans retroarch : Réglages/Entrées/Raccourcis : aucune touche clavier n'est prise en compte si on essaye de changer un mapping.

dazzyb2k3 commented 2 years ago

Works with me on x86_64 v34 beta 20220429. Can anyone confirm and close, please?

Sorry, still not working for me either (20220429). Game focus activates but no keys are functional. Also tried many combinations of gamefocus/passthrough/controller settings without success. What were the steps you followed to get the keyboard working?

lbrpdx commented 2 years ago

Maybe I misunderstood the issue. What I am doing is the following: I launch a game on a computer emulator (amstrad cpc for example). I hit the “scroll lock” key on my USB keyboard. I can see a little pop-up RetroArch window on the bottom left corner telling me focus is activated. Then, I can use my keyboard to type in any key directly on the Amstrad cpc, without RetroArch mapping taking priority. When I hit “scroll lock” again, it exists focus mode. Isn’t that the expected behavior?

Nash35400 commented 2 years ago

Bonjour Lorsque nous lançons un jeu par exemple "barbarian" ; l'émulateur attend qu'on appuie sur 1 ou 2 pour lancer le jeux. Hors excepté la touche échap aucune touche ne semble active.

merci

Hello When we launch a game for example "barbarian"; the emulator waits for you to press 1 or 2 to launch the game. Except for the escape key, no key seems active.

thank you

jmaneyrol69 commented 2 years ago

@lbrpdx I will test when I have the time (I haven't updated to the latest beta yet), but did you update:

So far, what happens is that Game focus ("scroll lock") is announced (pop-up) but pressing any key on the keyboard does not do anything until Game focus is disabled.

I had this behavior on Amiga (lr-puae) and C64 (lr-vice)

dazzyb2k3 commented 2 years ago

Maybe I misunderstood the issue. What I am doing is the following: I launch a game on a computer emulator (amstrad cpc for example). I hit the “scroll lock” key on my USB keyboard. I can see a little pop-up RetroArch window on the bottom left corner telling me focus is activated. Then, I can use my keyboard to type in any key directly on the Amstrad cpc, without RetroArch mapping taking priority. When I hit “scroll lock” again, it exists focus mode. Isn’t that the expected behavior?

Yes, that is the expected behaviour, and is how it worked up to v32 but since v33 none of the keys are passed to the core when game focus is activated. I still get the popup but it doesn't do anything. The spectrum emulator has a dedicated option for ‘sinclair keyboard’ which does still work as intended but the rest of the emulators which just have a ‘keyboard’ control option do not.

Rolling back to V32 solves the issue completely and i can use my keyboard like a native device no problem.

joishere commented 2 years ago

I summarize what I could test: Pi400 - V33 : it works rk3326 - V33 (tested by connecting a usb keyboard) : it works PC X86/64 - V32 : it works PC X86/64 - V33 and following : it doesn't work. PC X86/64 - V33 with the /usr/bin/retroarch binary of V32 (1.9.9) : it works.

jmaneyrol69 commented 2 years ago

Just tested yesterday and I confirm that v34 beta 20220429 does not fix the issue on PC (x86/64), at least for AMIGA (lr-puae) and C64 (lr-vice) cores - I haven't tested with other computer cores.

dazzyb2k3 commented 2 years ago

So far i tested the following PC x64

Amiga (lr-puae) C64 (lr-vice) Spectrum (lr-fuse) Amstrad (lr-cap32) MSX (lr-bluemsx) DOS (lr-dosboxpure)

All have the issue with game focus not working, You can workaround the Spectrum by setting controller port 3 to Sinclair Keyboard in the RA Quick menu. This doesn't work for the other cores however.

I also tested using different keyboards (wired/wireless/PS2) and it doesn't make any difference.

dazzyb2k3 commented 2 years ago

I don't know if this helps but just out of curiosity, I installed retroarch standalone via flatpak (which is the same version as in the latest 34 beta - 1.10.3) and I ran it directly from ports in the main menu and Focus Mode works perfectly. Keyboard is fully functional as expected.

jmaneyrol69 commented 2 years ago

@lbrpdx something just crossed my mind: what's your keyboard layout? I have a French AZERTY USB keyboard.

lbrpdx commented 2 years ago

I have a US QWERTY keyboard (USB too). But I reproduced the issue on a different machine, so there's something in there that needs to be fixed. I just need time to spend on that.

dazzyb2k3 commented 2 years ago

I have a US QWERTY keyboard (USB too). But I reproduced the issue on a different machine, so there's something in there that needs to be fixed. I just need time to spend on that.

So great to hear. Thank you for looking at it!

nadenislamarre commented 2 years ago

fixed for zxspectrum with https://github.com/batocera-linux/batocera.linux/pull/6137 basically, it requires a mapping in the controllers definitions. which other core has the issue ?

nadenislamarre commented 2 years ago

apparently :

Amiga (lr-puae) C64 (lr-vice) Spectrum (lr-fuse) Amstrad (lr-cap32) MSX (lr-bluemsx) DOS (lr-dosboxpure)

nadenislamarre commented 2 years ago

Spectrum (lr-fuse) => done. strange if that was working in v33

dazzyb2k3 commented 2 years ago

apparently :

Amiga (lr-puae) C64 (lr-vice) Spectrum (lr-fuse) Amstrad (lr-cap32) MSX (lr-bluemsx) DOS (lr-dosboxpure)

They are only the one's I've tested. My suspicion is it could be an issue for the other libretro computer emulators too., Spectrum wasn't working via Game Focus in 33 - but you could work around by setting controller 3 to Sinclair Keyboard.

I could be wrong, but this doesn't feel like a per-system config issue. It feels like game focus is just broken.

nadenislamarre commented 2 years ago

should be fixed by https://github.com/batocera-linux/batocera.linux/pull/6168. see next build in 5 hours.

zognic commented 2 years ago

fixed

joishere commented 2 years ago

should be fixed by #6168. see next build in 5 hours.

Yes :-) Fixed thanks

dazzyb2k3 commented 2 years ago

Confirmed. Thank you so much guys.

Nash35400 commented 2 years ago

Bonjour

Désolé, mais je n'ai pas compris qu elle est la solution ???

Sorry, but I did not understand what is the solution???

Merci

jmaneyrol69 commented 2 years ago

@Nash35400 il suffit de mettre à jour la version BETA (34) : le bug a été fixé. Ensuite, lorsqu'on appuie sur "défil" (Scroll lock) le mode "Game Focus" est activé et ce qu'on tape sur le clavier est capturé par l'émulateur. J'ai testé avec P-UAE et lr-VICE et ça fonctionne bien maintenant :slightly_smiling_face:

Nash35400 commented 2 years ago

Ok Merci, je fais ca cet après midi...

Nash