Key Event handling

Discussion in 'Mac Programming' started by slooksterPSV, Feb 28, 2007.

  1. macrumors 68030

    slooksterPSV

    Joined:
    Apr 17, 2004
    Location:
    Nowheresville
    #1
    How do you handle key events such as a tab (more specific to a tab key press)? I've looked through Apple's documentation, but I'm not sure how to do this. I want to create a note creation program.
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    It's kind of a wide ranging and complex topic. How are you capturing key presses to start with? Where is the input focus? Basically you need to insert yourself at the top of the Responder chain as Tab gets consumed by lots of different things before you will get a chance to handle it...
     
  3. thread starter macrumors 68030

    slooksterPSV

    Joined:
    Apr 17, 2004
    Location:
    Nowheresville
    #3
    I'm gonna do it by a custom view cause that seems easier, I just can't figure out how to make the NSTextView have a horizontal scrollbar, I'm trying to make it a subview of a ScrollView class that has a vertical scrollbar.
     

Share This Page