Dead keys babylon

Hello ,
I took Babylon’s documentation example of dead keys
when I am using Portuguese keyboard and trying to enter  , word dead always appears
near the requested input , is there any work around ?

Any Suggestion will be appreciated
Thank You

I am trying to understand the issue here - there seems to be a type inside the callback which might prevent it from working. is this better this way:

InputText onBeforeKeyAddObservable example | Babylon.js Playground (babylonjs.com)

I was trying to reproduce (i.e. typing Â) but i can’t see “dead” anywhere

Thank you for your help,
to reproduce the issue ,you have to switch to Portuguese keyboard and try to type
~ : you will get Dead
or try to enter ~ a , you will get Deadã

I think I found the solution ; I added a small condition
else if(input.currentKey === ‘Dead’){
input.currentKey = ‘’;
input.deadKey = false;
input.addKey = true;
}
so it will not output the word Dead anymore

Got it! can reproduce.
i’ll work on a fix

2 Likes

Yes, but this should be a global solution and not only in your output :slight_smile:

[GUI] deal with dead codes correctly by RaananW · Pull Request #13064 · BabylonJS/Babylon.js (github.com)

3 Likes

So by that no need to do anything to make it disappear ?

exactly. but this needs to be approved and merged first

1 Like

Meanwhile I will keep my other work around solution
will I receive any message when it’s approved ?

if you follow the issue, yes :slight_smile:

Sure I Will , Thank you :heart:

1 Like

hello @RaananW ,
I see that they accepted and merged the code , I updated my Babylon’s JS package to 5.27.0 but nothing changed
after updating all my Babylon’s packages the scene is not rendering perfectly ,to be able to continue and test the error if it’s resolved
is there anything major that changes with upgrading to v5 that should be changed in old code?

Thank you in advance

The code was merged and is included in 5.27.0, I’ll have to check why it is still not working.
Is it also failing in the playground?

Iam currently in version 4.2.2 , When I tried to update all my packages to 5.27.0 , the scene didn’t work as expected , is there any major changes that should be done ?

And in the playground where the version is 5.27.0 ; it’s not working

Thank you for your time ,

Seems to work for me:

image

InputText onBeforeKeyAddObservable example | Babylon.js Playground (babylonjs.com)

2 Likes