Copy (Cmd+C) and Paste (Cmd+V) do not work in text controls

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Copy (Cmd+C) and Paste (Cmd+V) do not work in text controls

Postby Czarek » Sun Jan 11, 2015 1:46 pm

Do I need to do something to enable these keyboard shortcuts? I've found this topicabout Copy/Paste support in off-screen rendering mode. It is said to call browser->GetFocusedFrame->Copy(). But in my case it is normal windowed rendering. Am I also required to call Copy() and implement keyboard handler to handle copy/paste shortcuts in windowed rendering?

Using branch 1650 revision 1639 on OSX Mavericks 10.9.4.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Copy (Cmd+C) and Paste (Cmd+V) do not work in text contr

Postby magreenblatt » Mon Jan 12, 2015 11:52 am

Shortcuts are handled via the application top menu on Mac where methods called by key bindings are defined in the XIB file (for example cefclient/mac/English.lproj/MainMenu.xib). If that doesn't exist you probably need to implement performKeyEquivalent.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Copy (Cmd+C) and Paste (Cmd+V) do not work in text contr

Postby salmon17 » Thu Aug 25, 2016 4:49 am

magreenblatt wrote:Shortcuts are handled via the application top menu on Mac where methods called by key bindings are defined in the XIB file (for example cefclient/mac/English.lproj/MainMenu.xib). If that doesn't exist you probably need to implement performKeyEquivalent.


thanks for this comment!
in our app somebody had removed the Edit menu and suddenly shortcuts stopped working.
this helped quickly find out the cause
salmon17
Newbie
 
Posts: 9
Joined: Tue Jul 05, 2016 9:55 am

Re: Copy (Cmd+C) and Paste (Cmd+V) do not work in text contr

Postby wanghongliang » Tue Dec 22, 2020 7:06 am

doucment has a iframe,the shortcut does not respond,how to do ?
wanghongliang
Techie
 
Posts: 11
Joined: Tue Aug 14, 2018 3:46 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 57 guests