Odd -keyDown problem
Odd -keyDown problem
- Subject: Odd -keyDown problem
- From: "Aychamo Aychamo" <email@hidden>
- Date: Mon, 23 Oct 2006 01:28:27 -0400
Hello
Some of my users are having problems with my custom view that uses
arrow keys. It's odd, because they have (apparently) the same
computer I do (PowerBook G4), but for them arrow keys don't work. My
view is a NSTableView with the -keyDown overridden with the following
code. A strange thing is that my subclass doesn't accept any mouse
movement, but some of the users can scroll up/down with the trackpad
(I can't...)
Here's the keyDown code, I got from Apple's docs:
// if it's an arrow key
// if ([theEvent modifierFlags] & NSNumericPadKeyMask) { // arrow keys
have this mask
NSString *theArrow = [theEvent charactersIgnoringModifiers];
unichar keyChar = 0;
if ( [theArrow length] == 0 ) return; // reject dead keys
if ( [theArrow length] == 1 ) {
keyChar = [theArrow characterAtIndex:0];
if ( keyChar == NSLeftArrowFunctionKey ) {
// whatever
return;
}
if ( keyChar == NSRightArrowFunctionKey ) {
/// whatever
return;
}
if ( keyChar == NSUpArrowFunctionKey ) {
//temp
[super keyDown:theEvent];
return;
}
if ( keyChar == NSDownArrowFunctionKey ) {
[super keyDown: theEvent];
return;
}
}
}
I can't see anything that seems weird, that would prevent *some*
people from using the arrow keys. The only thing I can think of is
that NSNumberKeyPadMask. I've removed that mask, and the code still
works fine for me. Could that pad be preventing some people from
using arrow keys?
Thank you
AA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden