Egui: right click menu

I wanted to know regarding egui for right click menu.

in this code:

ui.interact(egui::Rect::EVERYTHING, egui::Id::new("Right click menu"), egui::Sense::hover()).context_menu(|ui|
{
                            if ui.button(format!("test")).clicked() {

                            }
}

this would work if you did a right click but I want to also implement shortcuts as well for example:

if ui.input(|i| i.key_released(egui::Key::A) && i.modifiers.shift

I am not too sure how would I put right click event and this shortcut at the same time?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.