Open jeenhyung opened 8 years ago
This looks like a legitimate issue. I suspect it wasn't caught before because the GopherJS had a bug where it did not fail to compile when a switch
had duplicate case
s (see https://github.com/golang/go/issues/11578 as the upstream issue).
That issue has since been fixed (i.e., https://github.com/gopherjs/gopherjs/issues/269 is resolved), and this Go code is invalid and needs to be fixed for it to compile successfully.
The code to be fixed is here:
https://github.com/goxjs/glfw/blob/3ef83661bf02c111e9f84faada310a95c1762132/browser.go#L638
All those duplicate -1 key constants values are not compatible with the gxui code in keyboard_translate.go
. They need to be changed to unique values.
The Web APIs should be consulted in order to give them values compatible with what KeyboardEvent
s set their keyCode
property to. See the keyCode
tables at https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode. I will accept a PR to https://github.com/goxjs/glfw that fixes this issue.
@jeenhyung, I have fixed the issue in https://github.com/goxjs/glfw/commit/aee868d2f5e3a6875af474ec05c54b2a19d5695d. Please update github.com/goxjs/glfw
to latest version and gxui will work in browser.
This issue can be closed.
[OSX 10.10.5] when i run gxui sample project on web. but, I get this error:
Help plz fix this.