Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
We have an NSTextField inside an NSView which is inside a GtkNSView. I can type into the NSTextField with no issue, but if I press command-A (for select-all), command-c (for copy) or command-v (for paste) nothing happens.
This is very tricky. I don't really see how to handle these because GTK+
gets all key events (they go to the toplevel, so to GTK+/the app).
Unless somebody has a wonderful idea I miss, I can only think of adding
support for some hand-picked ones per *application*, as in:
In the action callbacks for command-A, command-C etc, check if the
currently focused widget is a GtkNSView, then check if the NSView inside
that has first responder is a NSTextFiels, then handle the commands
I'm thinking hard, but please drop me any other idea :)
If I understand what you're describing you're suggesting we track 'command-c' at the gtk level and then poke inside the NSView hierarchy to find a widget which we think we can 'copy' from and then manually do that copy.
I thought the issue was more that the widget was not getting the right key events from gtk.
I verified that the NSView gets the event, but that doesn't seem to help.
There must be some higher level logic in place that makes this happen
in native apps.
In the meantime I figured a less ugly workaround: we can implement GTK+
keybindings in GtkNSView for the most "popular" things like copy and paste,
and then simply call the embedded view's APIs directly. Not good, but better
than my idea above.
Back from vacation. Will implement the "common default" actions (cut, copy,
paste, select all) as widget keybindings. If any more are needed or if a
better idea came up, please let me know.
Can't you send the interpretKeyEvents message to the view?
Created attachment 4450 [details]
This implements cut, copy, paste and select all
Yes this is very ugly, and not even done using the promised
bindings, but it works :)
Please test and let me know if anything is missing, it's
trivial to add.
Will roll a new patch set the day before GUADEC next week,
so you get all patches done until then.
Patch landed, thanks!
Alan, could you verify it works?
*** Bug 20732 has been marked as a duplicate of this bug. ***
Reopening as bug #20732 was just filed saying that this does not work.
Fixed in mono/bockbuild master 299665380d350633c2b36f205eb50972f2a62d48