summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-16 18:56:03 -0400
committerPietro Gagliardi <[email protected]>2014-05-16 18:56:03 -0400
commit5176b0e9dd6e8b9440ca9a8568eec0d6340692cb (patch)
tree3c774d6e4e455dea678dabaf9a6bfdfd4abdb081
parentea9b4bdfc2906c22601ba4b509eadb8fbc706d46 (diff)
Added proper Super handling on Windows. Meta isn't used here and the modifiers were already in the correct order.
-rw-r--r--area_windows.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/area_windows.go b/area_windows.go
index ee2e4cf..b0f8e74 100644
--- a/area_windows.go
+++ b/area_windows.go
@@ -439,6 +439,7 @@ var (
func getModifiers() (m Modifiers) {
down := func(x uintptr) bool {
+ // TODO this might not be related to the actual message; GLFW does it
r1, _, _ := _getKeyState.Call(x)
return (r1 & 0x80) != 0
}
@@ -452,7 +453,9 @@ func getModifiers() (m Modifiers) {
if down(_VK_SHIFT) {
m |= Shift
}
- // TODO windows key (super)
+ if down(_VK_LWIN) || down(_VK_RWIN) {
+ m |= Super
+ }
return m
}