egui/crates/egui
Marijn Suijten 5b591d26f6
Add `Key::Cut`, `Key::Copy`, `Key::Paste` (#3725)
The comment added in commit 8a0bc97e ("[egui_glium] Fix paste") seems to
assume that `winit` "should have translated" common "paste" keyboard
combos to a `Cut`/`Copy`/`Paste` "KeyCode", but completely glossed over
the fact that this `KeyCode` (now also `NamedKey`) maps to a special key
dedicated to this purpose found on some keyboards and OSes. Make sure
that this key is still handled in addition to the combo that is
detected.

---

Note that this PR does not compile as it is (and I have hence not tested
this nor even ran into this limitation), just noticed this inconsistency
while failing to understand a code comment. We'd have to decide if the
variants should be added to `egui::Key` or if these helper functions
need to take `winit` keys (`ScanCode` or `NamedKey`) directly?

I should have an old keyboard with a physical paste key in a drawer
somewhere. And on Android there are special copy/paste events that can
be sent by a virtual keyboard or the debug shell, so that this can be
properly tested before it is merged.
(Except that the current `clipboard` implementation is not supported on
Android)
2023-12-25 19:02:02 +01:00
..
assets Improved texture loading (#3315) 2023-09-12 10:39:17 +02:00
examples Fix broken GitHub source links due to #1940 2022-08-20 15:18:02 +02:00
src Add `Key::Cut`, `Key::Copy`, `Key::Paste` (#3725) 2023-12-25 19:02:02 +01:00
Cargo.toml Release 0.24.1 - Bug fixes 2023-11-30 17:46:25 +01:00
README.md Move all crates into a `crates` directory (#1940) 2022-08-20 10:41:49 +02:00

README.md

GUI implementation

This is the core library crate egui. It is fully platform independent without any backend. You give the egui library input each frame (mouse pos etc), and it outputs a triangle mesh for you to paint.