summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-12 20:08:53 -0400
committerPietro Gagliardi <[email protected]>2014-08-12 20:08:53 -0400
commit6dcda6aafaa62e085e033038fce2e2e7ef6e25d4 (patch)
tree98b4bd57cf908d7bcdee8c656cf79310dbb18b34
parent9b35def046f8e3dd3ce64ff20fbf4aa03625e239 (diff)
Determined that Backspace, Tab, and Enter work in Areas on Windows (though more TODOs due to dialog message craziness).
-rw-r--r--redo/events_notdarwin.go6
-rw-r--r--redo/uitask_windows.c1
-rw-r--r--redo/zz_test.go2
3 files changed, 5 insertions, 4 deletions
diff --git a/redo/events_notdarwin.go b/redo/events_notdarwin.go
index be9515a..1cd46ad 100644
--- a/redo/events_notdarwin.go
+++ b/redo/events_notdarwin.go
@@ -86,8 +86,8 @@ var scancodeKeys = map[uintptr]byte{
0x0B: '0',
0x0C: '-',
0x0D: '=',
- 0x0E: '\b', // seems to be safe on GTK+; TODO safe on windows?
- 0x0F: '\t', // seems to be safe on GTK+; TODO safe on windows?
+ 0x0E: '\b',
+ 0x0F: '\t',
0x10: 'q',
0x11: 'w',
0x12: 'e',
@@ -100,7 +100,7 @@ var scancodeKeys = map[uintptr]byte{
0x19: 'p',
0x1A: '[',
0x1B: ']',
- 0x1C: '\n', // seems to be safe on GTK+; TODO safe on windows?
+ 0x1C: '\n',
0x1E: 'a',
0x1F: 's',
0x20: 'd',
diff --git a/redo/uitask_windows.c b/redo/uitask_windows.c
index 23aba52..5d5f503 100644
--- a/redo/uitask_windows.c
+++ b/redo/uitask_windows.c
@@ -17,6 +17,7 @@ void uimsgloop(void)
if (res == 0) /* WM_QUIT */
break;
active = GetActiveWindow();
+ // TODO this interferes with Area
if (active != NULL && IsDialogMessageW(active, &msg) != 0)
continue;
TranslateMessage(&msg);
diff --git a/redo/zz_test.go b/redo/zz_test.go
index 525447e..9747700 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -54,7 +54,7 @@ func (a *areaHandler) Paint(r image.Rectangle) *image.RGBA {
return i
}
func (a *areaHandler) Mouse(me MouseEvent) { fmt.Printf("%#v\n", me) }
-func (a *areaHandler) Key(ke KeyEvent) { fmt.Printf("%#v\n", ke) }
+func (a *areaHandler) Key(ke KeyEvent) { fmt.Printf("%#v %q\n", ke, ke.Key) }
func (tw *testwin) make(done chan struct{}) {
tw.t = NewTab()