title: Capture key press event using NSNotificationCenter
body: <p>this solution
  <a href="https://stackoverflow.com/questions/1267560/iphone-keyboard-event">Receive iPhone keyboard events</a></p>
  <p>offers a way to capture the keypress event using notification center.</p>
  <pre><code>[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(keyPressed:) name: UITextFieldTextDidChangeNotification object: nil];
  
  [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(keyPressed:) name: UITextViewTextDidChangeNotification object: nil];
  
  ........
  
  -(void) keyPressed: (NSNotification*) notification
  {
    NSLog([[notification object]text]);
  }
  </code></pre>
  <p>It works ok, but for every key that is been pressed from the keyboard the keyPressed function gets called 3 times.</p>
  <p>Is this normal or am i doing something wrong?</p>
  <p>Teo</p>