Odd -keyDown problem

  • 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
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today