type KeyEvent = {
key: string,
modifiers: {shift: bool, ctrl: bool, alt: bool, logo: bool},
text: string,
repeat: bool
};
type KeyboardArea = {
child: &Widget,
on_key_press: &fn(e: KeyEvent) -> Any,
on_key_release: &fn(e: KeyEvent) -> Any
};
val keyboard_area: fn(
?#on_key_press: fn(e: KeyEvent) -> Any,
?#on_key_release: fn(e: KeyEvent) -> Any,
child: &Widget
) -> Widget