|
|
On 11/30/21 2:42 PM 'Mark' via fltk.general wrote:
At the moment I have this (using the rust bindings):
```rust
main_window.handle(move |_, event| match event {
fltk::enums::Event::KeyUp => {
match fltk::app::event_key() {
// TODO | F1
fltk::enums::Key::Help => sender.send(WindowAction::Help),
_ => {}
}
false
}
_ => false,
});
```
But I can't figure out what I need to do to detect F1.
I can't speak for the Rust bindings, but in C++ you would use 'FL_F+n'
for Fn where 'n' is a numeric value, hence F1 would be FL_F+1.
Key values are defined in FL/Enumerations.H, specifically here:
https://github.com/fltk/fltk/blob/36af6a57295a5f3c674134cab60dc644c96e97fa/FL/Enumerations.H#L477
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/263c3b94-26c2-f1e3-ddfd-5e5d4c804f8c%40online.de.
[ Direct Link to Message ] | |
|
| |