disable hotkeys when some widget is focused

This commit is contained in:
2025-11-23 01:46:47 +03:00
parent adfc0f25c4
commit bb83ac54ef
+4
View File
@@ -5,6 +5,10 @@ use std::path::PathBuf;
impl SoundpadGui { impl SoundpadGui {
pub fn handle_input(&mut self, ctx: &Context) { pub fn handle_input(&mut self, ctx: &Context) {
if ctx.memory(|reader| { reader.focused() }.is_some()) {
return;
}
ctx.input(|i| { ctx.input(|i| {
// Close app on espace // Close app on espace
if i.key_pressed(Key::Escape) { if i.key_pressed(Key::Escape) {