summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-06 19:35:26 -0400
committerPietro Gagliardi <[email protected]>2014-06-06 19:35:26 -0400
commitb6ca65069244ef4d85ae7f26e6bfee046cb4b6a8 (patch)
tree4a634373a8ae694bcc379f5619a8a2ef3413cce3
parent3f45feab0bdacc971a24a1c8722bc06afc29e01e (diff)
Added Help key handling (as Insert) on Mac OS X.
-rw-r--r--area.go2
-rw-r--r--events_darwin.go2
-rw-r--r--todo.md3
3 files changed, 3 insertions, 4 deletions
diff --git a/area.go b/area.go
index 5608558..ae890a3 100644
--- a/area.go
+++ b/area.go
@@ -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
diff --git a/events_darwin.go b/events_darwin.go
index e725d37..e2ec2e3 100644
--- a/events_darwin.go
+++ b/events_darwin.go
@@ -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,
diff --git a/todo.md b/todo.md
index 3c10854..72572f5 100644
--- a/todo.md
+++ b/todo.md
@@ -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