webview_cef icon indicating copy to clipboard operation
webview_cef copied to clipboard

keyboard messed up on webview_cef: ^0.1.0

Open BullsEye34 opened this issue 2 years ago • 7 comments

Hi, I have been facing a new issue with the latest changes. Steps to reproduce:

  • Run the app
  • Have a textfield anywhere in the app
  • Press any of these keys

d - opens dictionary e - emoji panel opens f - force quits the app

Have not tested with the other keys yet.

Edit: Can not confirm if this was reproducible prior to 0.1.0

BullsEye34 avatar May 31 '23 11:05 BullsEye34

Which platform you met the issue?

hlwhl avatar Jun 01 '23 01:06 hlwhl

Hi @hlwhl , I met this issue on the MacOS platform. I cannot confirm it out on other platforms.

BullsEye34 avatar Jun 01 '23 02:06 BullsEye34

I am experiencing the same issue on MacOS, only f doesn't close the application but tries to request full screen.

philipscott avatar Aug 19 '23 00:08 philipscott

I have had the same issue on MacOS. Here a hot fix: In class: macos/Classes/CefWrapper.mm Add:

if ([ns_event type] == NSKeyDown)
        {
            if(!([ns_event keyCode] == 2/*d*/ || [ns_event keyCode] == 3/*f*/ || [ns_event keyCode] == 14/*e*/)) {
                keyEvent.type =  KEYEVENT_KEYDOWN;
                handler.get()->sendKeyEvent(keyEvent);
            }

            keyEvent.type =  KEYEVENT_CHAR;
            handler.get()->sendKeyEvent(keyEvent);

        }

CodingCrog avatar Sep 15 '23 13:09 CodingCrog

I have had the same issue on MacOS. Here a hot fix: In class: macos/Classes/CefWrapper.mm Add:

if ([ns_event type] == NSKeyDown)
        {
            if(!([ns_event keyCode] == 2/*d*/ || [ns_event keyCode] == 3/*f*/ || [ns_event keyCode] == 14/*e*/)) {
                keyEvent.type =  KEYEVENT_KEYDOWN;
                handler.get()->sendKeyEvent(keyEvent);
            }

            keyEvent.type =  KEYEVENT_CHAR;
            handler.get()->sendKeyEvent(keyEvent);

        }

This looks nice

This is a really nice idea though. Temporarily.

BullsEye34 avatar Sep 15 '23 14:09 BullsEye34

Yeah just a temporary solution. I have also updated the deprecated flags but for some reasons I cannot upload a .mm file here.

CodingCrog avatar Sep 15 '23 14:09 CodingCrog

Yeah just a temporary solution. I have also updated the deprecated flags but for some reasons I cannot upload a .mm file here.

That's cool

I use an M1 Pro MacBook Pro. Haven't tested on others.

BullsEye34 avatar Sep 15 '23 14:09 BullsEye34