Skip navigation.
 
mlFwd: Converting keyCode&modifierFlags to NSString
FROM : Jonathan Grynspan
DATE : Tue Aug 01 17:39:28 2006

Oops, I forgot to send it to the list.

-Jonathan Grynspan

Begin forwarded message:

> From: Jonathan Grynspan <<email_removed>>
> Date: August 1, 2006 11:38:45 AM EDT (CA)
> To: Fabian Schuiki <<email_removed>>
> Subject: Re: Converting keyCode&modifierFlags to NSString
>
> Take a look at the enums near the bottom of NSEvent.h. They include 
> unichar values for most function/control keys. Compare them to the 
> first character in the result of -characters or -
> charactersIgnoringModifiers:
>
> if ([[anEvent characters] length] > 0 && [[anEvent characters] 
> characterAtIndex: 0] == NSDeleteFunctionKey) {
>     /* do stuff here */
> }
>
> -Jonathan Grynspan
>
> On 1-Aug-06, at 11:32 AM, Fabian Schuiki wrote:
>

>> I already use them, but there are several special characters for 
>> Keys like Escape, Backspace, Delete, Arrows etc.
>>
>> Best,
>> Fabian
>>
>> Fabian Schuiki
>> <email_removed>
>> CEO
>>
>>
>> Am 01.08.2006 um 16:57 schrieb Jonathan Grynspan:
>>

>>> Take a look at the -characters and -charactersIgnoringModifiers 
>>> messages belonging to NSEvent. They should do what you're looking 
>>> for. :)
>>>
>>> -Jonathan Grynspan
>>>
>>> On 1-Aug-06, at 9:19 AM, Fabian Schuiki wrote:
>>>

>>>> Hi,
>>>>
>>>> Is it somehow possible to convert an NSEvent's keyCode and 
>>>> modifierFlags to an NSString, containing a representation of 
>>>> that keyCode and modifierFlags, such as the keyEquivalent 
>>>> representation in an NSMenuItem?
>>>> This has to be possible, hasn't it?
>>>>
>>>> Best Regards,
>>>> Fabian Schuiki
>>>>
>>>> Fabian Schuiki
>>>> <email_removed>
>>>>
>>>>
>>>> _______________________________________________
>>>> MacOSX-dev mailing list
>>>> <email_removed>
>>>> http://www.omnigroup.com/mailman/listinfo/macosx-dev

>>>
>>> _______________________________________________
>>> MacOSX-dev mailing list
>>> <email_removed>
>>> http://www.omnigroup.com/mailman/listinfo/macosx-dev

>>
>> _______________________________________________
>> MacOSX-dev mailing list
>> <email_removed>
>> http://www.omnigroup.com/mailman/listinfo/macosx-dev

>

Related mailsAuthorDate
No related mails found.