Re: Distinguishing between return and enter in NSTextField
Re: Distinguishing between return and enter in NSTextField
- Subject: Re: Distinguishing between return and enter in NSTextField
- From: Rick Mann <email@hidden>
- Date: Fri, 4 Sep 2009 09:10:23 -0700
I wouldn't do anything at all. I'd still treat return and enter
differently.
As a separate matter, I hate not having a separate enter key. I wrote
a program that re-maps the right-hand option key to behave like an
enter key.
On Sep 4, 2009, at 05:31:15, Michael Domino wrote:
Rick,
My Mac has a single enter/return key (both words appear on the key,
I hate not having a separate enter key). What would you do in that
case?
On Sep 3, 2009, at 11:18 AM, Rick Mann <email@hidden> wrote:
> I would like to use the delegate, but it sends me insertNewLine: for
> both keys.
>
> Is there another method I can implement?
>
> On Sep 3, 2009, at 11:14:20, Douglas Davidson wrote:
>
>> Short answer: no. Stay away from keyDown: and look at delegate
>> methods instead. I have a standard rant on this topic; I don't have
>> it handy but it should be in the list archives.
>>
>> Douglas Davidson
>>
>>
>>
>> On Sep 3, 2009, at 10:54 AM, Rick Mann <email@hidden>
wrote:
>>
>>> Hi. I'd like to insert a new line when the user presses return in
>>> an NSTextField, but take completely custom action when they press
>>> Enter. Is the only way to do this to subclass NSTextField and
>>> override the NSResponder keyDown: method?
>>>
>>> TIA,
>>> Rick
>>
>
--
Michael Domino
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden