Added (most of) the Super and Meta changes for GTK+. The Modifiers were already in the correct order.
This commit is contained in:
parent
13397f91ee
commit
ea9b4bdfc2
18
area_unix.go
18
area_unix.go
|
@ -95,12 +95,15 @@ func makeModifiers(state C.guint, m Modifiers) Modifiers {
|
|||
if (state & C.GDK_CONTROL_MASK) != 0 {
|
||||
m |= Ctrl
|
||||
}
|
||||
if (state & C.GDK_META_MASK) != 0 {
|
||||
if (state & C.GDK_META_MASK) != 0 { // TODO get equivalent for Alt
|
||||
m |= Alt
|
||||
}
|
||||
if (state & C.GDK_SHIFT_MASK) != 0 {
|
||||
m |= Shift
|
||||
}
|
||||
if (state & C.GDK_SUPER_MASK) != 0 {
|
||||
m |= Super
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
|
@ -324,15 +327,14 @@ func init() {
|
|||
}
|
||||
|
||||
var modonlykeys = map[C.guint]Modifiers{
|
||||
C.GDK_KEY_Shift_L: Shift,
|
||||
C.GDK_KEY_Shift_R: Shift,
|
||||
C.GDK_KEY_Control_L: Ctrl,
|
||||
C.GDK_KEY_Control_R: Ctrl,
|
||||
C.GDK_KEY_Meta_L: Alt,
|
||||
C.GDK_KEY_Meta_R: Alt,
|
||||
// my system generats these two for the Alt keys instead of Meta
|
||||
C.GDK_KEY_Alt_L: Alt,
|
||||
C.GDK_KEY_Alt_R: Alt,
|
||||
// C.GDK_KEY_Super_L: Super,
|
||||
// C.GDK_KEY_Super_R: Super,
|
||||
C.GDK_KEY_Meta_L: Alt,
|
||||
C.GDK_KEY_Meta_R: Alt,
|
||||
C.GDK_KEY_Shift_L: Shift,
|
||||
C.GDK_KEY_Shift_R: Shift,
|
||||
C.GDK_KEY_Super_L: Super,
|
||||
C.GDK_KEY_Super_R: Super,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue