Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Changeset [70f8e3a8320bedf420f3fa627e2cd15e18766d06] by Alexander Ljungberg

Revision 70f8e3a8320bedf420f3fa627e2cd15e18766d06, committed by Alexander Ljungberg · July 17th, 2011 @ 04:55 PM

Merge pull request #1278 from aparajita/cappuccino


I discovered the following behavior that is not in conformance with Cocoa:

  • Backspace, tab, escape, and space are considered key equivalents.
  • Function keys (F1 - FNN) are not considered key equivalents.
  • CPTextField executes performKeyEquivalent twice if a field is first responder.

Build this Cocoa project and debug it: http://d.pr/Xc3h

Take a look at the debug log while typing some keys. You will see that backspace, tab, escape and space do not trigger performKeyEquivalent, and that performKeyEquivalent is only executed once for the first responder.

Then run the performKeyEquivalentsTest app in this commit and look at the console log while trying keys in the text fields. If you turn the old code on, you will see how performKeyEquivalent is executed twice for the first responder.

For reference on key handling code, I consulted this:

http://developer.apple.com/library/mac/#documentation/Cocoa/Concept...
https://github.com/280north/cappuccino/commit/70f8e3a8320bedf420f3f...

11 changed files

  • A Tests/Manual/performKeyEquivalentTest/AppController.j
  • A Tests/Manual/performKeyEquivalentTest/Info.plist
  • A Tests/Manual/performKeyEquivalentTest/Jakefile
  • A Tests/Manual/performKeyEquivalentTest/Resources/MainMenu.cib
  • A Tests/Manual/performKeyEquivalentTest/Resources/MainMenu.xib
  • A Tests/Manual/performKeyEquivalentTest/Resources/spinner.gif
  • A Tests/Manual/performKeyEquivalentTest/index-debug.html
  • A Tests/Manual/performKeyEquivalentTest/index.html
  • A Tests/Manual/performKeyEquivalentTest/main.j
  • M AppKit/CPEvent.j
  • M AppKit/CPTextField.j