Bug 53962 - Setting return as a Key Equivalent for NSButton on Interface Builder does not produce desired result
Summary: Setting return as a Key Equivalent for NSButton on Interface Builder does not...
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Runtime ()
Version: Master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-03-24 21:20 UTC by Eugenio Casal
Modified: 2017-04-25 14:29 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Project that reproduces the problem (352.80 KB, application/zip)
2017-04-25 14:19 UTC, Eugenio Casal
Objective C equivalent (31.72 KB, application/zip)
2017-04-25 14:28 UTC, Eugenio Casal

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 for Bug 53962 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Eugenio Casal 2017-03-24 21:20:09 UTC
If I define the return key as the Key Equivalent for an NSButton on Interface Builder the button becomes blue as expected but when I run the project the NSButton is not blue and does not work as a default button as expected.

If I set the KeyEquivalent property of the NSButton in code (someButton.KeyEquivalent = "\r") then it works perfectly.
Comment 1 Manuel de la Peña [MSFT] 2017-03-27 09:53:01 UTC

Can you please provide the details of your enviroment. The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).

We would need that information to know exactly the version of the interface builder you are using in order to triage the bug.
Comment 2 Eugenio Casal 2017-03-27 13:56:25 UTC
=== Xamarin Studio Enterprise ===

Version 6.2 (build 1829)
Installation UUID: 3add6d20-9b8a-4396-8104-61c8d4f86993
	Mono 4.8.0 (mono-4.8.0-branch/8f6d0f6) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000520

=== NuGet ===


=== Xamarin.Profiler ===

Version: 1.2.1
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: (Visual Studio Enterprise)
Hash: ba11e48
Branch: cycle9
Build date: 2017-03-10 08:48:04-0500

=== Xamarin.Android ===

Version: (Visual Studio Enterprise)
Android SDK: /Users/eugenio/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.2.0
Hash: 62c17e6
Branch: d15-1
Build date: Mon, 20 Mar 2017 02:36:23 GMT

=== Build Information ===

Release ID: 602001829
Git revision: 3a28108feb03a6384702c96ffc8c548121cdf37c
Build date: 2017-03-12 06:55:23-04
Xamarin addins: 295d27f8dcdde049a1807a76c888fc0a6557357d
Build lane: monodevelop-lion-cycle9

=== Operating System ===

Mac OS X 10.12.3
Darwin Eugenios-MacBook-Pro-2.local 16.4.0 Darwin Kernel Version 16.4.0
    Thu Dec 22 22:53:21 PST 2016
    root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
Comment 3 Manuel de la Peña [MSFT] 2017-04-25 10:27:23 UTC
Hello, Thx for the info! Sorry for the delay, this must have been picked up by the bug triaging team. Looking into it.
Comment 4 Manuel de la Peña [MSFT] 2017-04-25 10:28:03 UTC
Also, is there an example project that can be used to reproduce the issue?
Comment 5 Eugenio Casal 2017-04-25 14:19:48 UTC
Created attachment 21760 [details]
Project that reproduces the problem

This project reproduces the problem.
Comment 6 Eugenio Casal 2017-04-25 14:28:11 UTC
Created attachment 21762 [details]
Objective C equivalent

This Objective C project is equivalent to the Xamarin project (same functionality) but there's no need to set the KeyEquivalent property in code, just on Interface Builder. This is the expected behavior.
Comment 7 Eugenio Casal 2017-04-25 14:29:46 UTC
Hello, I've sent the example project as requested.