ui.backend.x11.keys: Support for the Windows/Meta key on X11
parent
de2e01268e
commit
acdcc1f2c2
basis/ui
backend
x11/keys
gestures
|
@ -47,6 +47,22 @@ IN: ui.backend.gtk.tests
|
|||
{ is_modifier 1 }
|
||||
} ;
|
||||
|
||||
: gdk-windows-key-release-event ( -- event )
|
||||
S{ GdkEventKey
|
||||
{ type 9 }
|
||||
{ window ALIEN: 1a71d80 }
|
||||
{ send_event 0 }
|
||||
{ time 47998769 }
|
||||
{ state 67108928 }
|
||||
{ keyval 119 }
|
||||
{ length 1 }
|
||||
{ string ALIEN: 2017640 }
|
||||
{ hardware_keycode 25 }
|
||||
{ group 0 }
|
||||
{ is_modifier 0 }
|
||||
} ;
|
||||
|
||||
|
||||
! The Mac build servers doesn't have the gtk libs
|
||||
os linux? [
|
||||
! key-event>gesture
|
||||
|
@ -54,10 +70,12 @@ os linux? [
|
|||
T{ key-down f f "F2" }
|
||||
T{ key-up f f "H" }
|
||||
T{ key-down f f " " }
|
||||
T{ key-up { mods { M+ } } { sym "w" } }
|
||||
} [
|
||||
gdk-key-press-event key-event>gesture
|
||||
gdk-key-release-event key-event>gesture
|
||||
gdk-space-key-press-event key-event>gesture
|
||||
gdk-windows-key-release-event key-event>gesture
|
||||
] unit-test
|
||||
|
||||
! key-sym
|
||||
|
|
|
@ -8,6 +8,7 @@ CONSTANT: modifiers
|
|||
{ S+ 0x1 }
|
||||
{ C+ 0x4 }
|
||||
{ A+ 0x8 }
|
||||
{ M+ 0x40 }
|
||||
}
|
||||
|
||||
CONSTANT: codes
|
||||
|
|
|
@ -128,7 +128,7 @@ HELP: A+
|
|||
{ $description "Alt key modifier." } ;
|
||||
|
||||
HELP: M+
|
||||
{ $description "Meta key modifier. This is the Command key on Mac OS X." } ;
|
||||
{ $description "Meta key modifier. This is the Command key on Mac OS X and the Windows key on other Unices and Windows." } ;
|
||||
|
||||
HELP: S+
|
||||
{ $description "Shift key modifier." } ;
|
||||
|
@ -257,7 +257,7 @@ ARTICLE: "gesture-differences" "Gesture handling differences between platforms"
|
|||
{ { $link S+ } "Shift" }
|
||||
{ { $link A+ } "Alt" }
|
||||
{ { $link C+ } "Control" }
|
||||
{ { $link M+ } "Windows key" }
|
||||
{ { $link M+ } "Windows key (often called Super on Unix)" }
|
||||
}
|
||||
"On Windows, " { $link key-up } " gestures are not reported for all keyboard events."
|
||||
$nl
|
||||
|
@ -342,6 +342,10 @@ ARTICLE: "keyboard-gestures" "Keyboard gestures"
|
|||
{ $snippet "F6" }
|
||||
{ $snippet "F7" }
|
||||
{ $snippet "F8" }
|
||||
{ $snippet "F9" }
|
||||
{ $snippet "F10" }
|
||||
{ $snippet "F11" }
|
||||
{ $snippet "F12" }
|
||||
{ $snippet "LEFT" }
|
||||
{ $snippet "RIGHT" }
|
||||
{ $snippet "DOWN" }
|
||||
|
|
Loading…
Reference in New Issue