CEF - AltGr + ... characters problem.

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

CEF - AltGr + ... characters problem.

Postby thierry » Fri Nov 19, 2021 4:17 am

Hello,

I made software for my clients with CEF (CEFsharp).
Unfortunately, my customers have a problem with a Javascript plugin for editing "rich text" (redactor) which does not allow you to enter the @ character while under chrome, Edge chromium or firefox no problem.

On the French keyboard, the character @ is entered with the key combination altGr + 0.
But this key combination is a component keyboard shortcut to make text bigger.
It is not possible to enter a certain number of characters from 'AlftGr + 0' to 'AltGr + 9' ...

But in Chrome, Edge and Firefox we don't have this behavior / bug.
It is possible to enter the character @ without the JS shortcuts of the component blocking the propagation of the key.

Why ?

By removing the component shortcuts in JS, no worries about entering @.

To test this -> https://imperavi.com/redactor/

If someone could tell me if indeed there is a problem in CEF or if I missed something on the side of the use that I make of CEF (bug on my side or other)

Thank you
thierry
Techie
 
Posts: 10
Joined: Fri Nov 19, 2021 3:48 am

Re: CEF - AltGr + ... characters problem.

Postby amaitland » Fri Nov 19, 2021 2:09 pm

What version are you using? Are you using WPF?

Please test with the CEF sample application as detailed at https://github.com/cefsharp/CefSharp/bl ... ameworkcef

Making sure you test with the command line args that match the implementation you are using.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF - AltGr + ... characters problem.

Postby thierry » Sat Nov 20, 2021 1:58 pm

Hello,

I did the requested test (WPF command line)

By going to the site https://imperavi.com/redactor/ and trying to type @ (altGr + 0 on my French keyboard) nothing happens.

By doing the same in Chrome, Edge and Firefox no problem, I can type @ (email address for example).

By removing, as seen on the site of this text editing component, the keyboards shortcuts set up in javascript by this component, no worries.
thierry
Techie
 
Posts: 10
Joined: Fri Nov 19, 2021 3:48 am

Re: CEF - AltGr + ... characters problem.

Postby amaitland » Sat Nov 20, 2021 2:14 pm

Please answer all questions
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF - AltGr + ... characters problem.

Postby thierry » Sat Nov 20, 2021 3:46 pm

amaitland wrote:Please answer all questions



You're right, sorry.

I am using CEFSharp WPF version 88.2.90.

However, I also tested with version 79 and 92.
And the previous test requested in 95.
thierry
Techie
 
Posts: 10
Joined: Fri Nov 19, 2021 3:48 am

Re: CEF - AltGr + ... characters problem.

Postby amaitland » Sat Nov 20, 2021 5:43 pm

Some improvements were made in version 93.

https://github.com/cefsharp/CefSharp/pull/3769

Does upgrading to CefSharp version 95 fix your problem?

Looks like the cefclient needs updating to allow for input using left alt.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF - AltGr + ... characters problem.

Postby thierry » Mon Nov 22, 2021 4:21 am

Hello,

I had already tested in CEFShap 95 and the problem was the same.
I just redid the test (CEFSharp WPF version 95.7.141) to be sure and the problem is there.

To summarize, I did the test in CEFSharp WPF 79, 88.2.90, 92 and 95.7.14.
I also did the test with the CEF example application (see your previous post) which was in version 95.

Perhaps it is the fact that in French keyboard the AltGR + 0 (0 ... 9) corresponds to keyboard characters while in other languages ​​not?

In Chrome, edge chromium and Firefox, the @ key (alftGr + 0) is entered on the screen and the shortcut in JS of the component does not seem to work while in CEFsharp, the @ key is not entered and the component's JS shortcut is active.

The key entry does not seem to propagate after interrupted by the JS code of the redactor component and is therefore not entered?
Or since the character is a valid keyboard character, it should be entered in the textarea and not passed to the component's JS?

Regards
thierry
Techie
 
Posts: 10
Joined: Fri Nov 19, 2021 3:48 am

Re: CEF - AltGr + ... characters problem.

Postby amaitland » Mon Nov 22, 2021 4:25 am

You can either switch to https://github.com/cefsharp/CefSharp.Wpf.HwndHost or debug the code yourself, the CefSharp specific part is https://github.com/cefsharp/CefSharp/bl ... r.cpp#L383

It's possible that changes to CEF are required, I don't have the hardware to test so I don't have any insight as to where the problem lies.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF - AltGr + ... characters problem.

Postby thierry » Mon Nov 22, 2021 4:33 am

The problem with CefSharp.Wpf.HwndHost and that the minimum version of .NET is version 4.6.2 while for CEFSharp WPF it is version 4.5.2 and therefore the prerequisites for our customers change ...

Thanks for your reply, I will test this for your if that fixes my problem.
thierry
Techie
 
Posts: 10
Joined: Fri Nov 19, 2021 3:48 am

Re: CEF - AltGr + ... characters problem.

Postby thierry » Mon Nov 22, 2021 4:45 am

OK, this works with CefSharp.Wpf.HwndHost 95.7.141

By going to https://imperavi.com/redactor/ and doing 'AltGR + 0' in the component, the @ character is well entered ...

So for my problem:
- CEFSharp Wpf -> NOK
- CefSharp.Wpf.HwndHost -> OK
thierry
Techie
 
Posts: 10
Joined: Fri Nov 19, 2021 3:48 am

Next

Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 12 guests