Added Help key handling (as Insert) on Mac OS X.

This commit is contained in:
Pietro Gagliardi 2014-06-06 19:35:26 -04:00
parent 3f45feab0b
commit b6ca650692
3 changed files with 3 additions and 4 deletions

View File

@ -187,7 +187,7 @@ type KeyEvent struct {
type ExtKey uintptr
const (
Escape ExtKey = iota + 1
Insert
Insert // equivalent to "Help" on Apple keyboards
Delete
Home
End

View File

@ -90,7 +90,7 @@ var keycodeExtKeys = map[uintptr]ExtKey{
0x67: F11,
0x6D: F10,
0x6F: F12,
// 0x72: kVK_Help,
0x72: Insert, // listed as the Help key but it's in the same position on an Apple keyboard as the Insert key on a Windows keyboard; thanks to SeanieB from irc.badnik.net and Psy in irc.freenode.net/#macdev for confirming they have the same code
0x73: Home,
0x74: PageUp,
0x75: Delete,

View File

@ -3,8 +3,7 @@ MAC OS X:
- asked: http://stackoverflow.com/questions/23046414/cocoa-how-do-i-get-nscombobox-indexofselecteditem-to-return-1-if-the-user-m
- 10.6 also spits a bunch of NSNoAutoreleasePool() debug log messages even though I thoguht I had everything in an NSAutoreleasePool...
- OS X: key up with a modifier held and our new modifiers code doesn't seem to happen?
- OS X: handle Insert/Help key change in a sane and deterministic way
- will need old and new Mac keyboards...
- figure out how to bypass the window manager's Help key handling
- point out that Areas get keyboard focus automatically on click on Mac OS X
- make sure Areas get keyboard focus when clicking outside the actual Area space on Mac OS X