Determined that Backspace, Tab, and Enter work in Areas on Windows (though more TODOs due to dialog message craziness).
This commit is contained in:
parent
9b35def046
commit
6dcda6aafa
|
@ -86,8 +86,8 @@ var scancodeKeys = map[uintptr]byte{
|
||||||
0x0B: '0',
|
0x0B: '0',
|
||||||
0x0C: '-',
|
0x0C: '-',
|
||||||
0x0D: '=',
|
0x0D: '=',
|
||||||
0x0E: '\b', // seems to be safe on GTK+; TODO safe on windows?
|
0x0E: '\b',
|
||||||
0x0F: '\t', // seems to be safe on GTK+; TODO safe on windows?
|
0x0F: '\t',
|
||||||
0x10: 'q',
|
0x10: 'q',
|
||||||
0x11: 'w',
|
0x11: 'w',
|
||||||
0x12: 'e',
|
0x12: 'e',
|
||||||
|
@ -100,7 +100,7 @@ var scancodeKeys = map[uintptr]byte{
|
||||||
0x19: 'p',
|
0x19: 'p',
|
||||||
0x1A: '[',
|
0x1A: '[',
|
||||||
0x1B: ']',
|
0x1B: ']',
|
||||||
0x1C: '\n', // seems to be safe on GTK+; TODO safe on windows?
|
0x1C: '\n',
|
||||||
0x1E: 'a',
|
0x1E: 'a',
|
||||||
0x1F: 's',
|
0x1F: 's',
|
||||||
0x20: 'd',
|
0x20: 'd',
|
||||||
|
|
|
@ -17,6 +17,7 @@ void uimsgloop(void)
|
||||||
if (res == 0) /* WM_QUIT */
|
if (res == 0) /* WM_QUIT */
|
||||||
break;
|
break;
|
||||||
active = GetActiveWindow();
|
active = GetActiveWindow();
|
||||||
|
// TODO this interferes with Area
|
||||||
if (active != NULL && IsDialogMessageW(active, &msg) != 0)
|
if (active != NULL && IsDialogMessageW(active, &msg) != 0)
|
||||||
continue;
|
continue;
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
|
|
|
@ -54,7 +54,7 @@ func (a *areaHandler) Paint(r image.Rectangle) *image.RGBA {
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
func (a *areaHandler) Mouse(me MouseEvent) { fmt.Printf("%#v\n", me) }
|
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{}) {
|
func (tw *testwin) make(done chan struct{}) {
|
||||||
tw.t = NewTab()
|
tw.t = NewTab()
|
||||||
|
|
Loading…
Reference in New Issue