Skip to content

Commit 99a3773

Browse files
committed
fix: revert "improv: read key nav events on key press to reduce perceived latency"
This reverts commit afa480b.
1 parent 51f3f92 commit 99a3773

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/app.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,9 +876,8 @@ impl cosmic::Application for CosmicLauncher {
876876
cosmic::iced::Event::PlatformSpecific(PlatformSpecific::Wayland(
877877
wayland::Event::Layer(e, ..),
878878
)) => Some(Message::Layer(e)),
879-
cosmic::iced::Event::Keyboard(iced::keyboard::Event::KeyPressed {
879+
cosmic::iced::Event::Keyboard(iced::keyboard::Event::KeyReleased {
880880
key,
881-
text,
882881
modifiers,
883882
..
884883
}) => match key {
@@ -904,6 +903,14 @@ impl cosmic::Application for CosmicLauncher {
904903
Key::Named(Named::Escape) => Some(Message::Hide),
905904
Key::Named(Named::Tab) => Some(Message::TabRelease),
906905
Key::Named(Named::Alt | Named::Super) => Some(Message::AltRelease),
906+
_ => None,
907+
},
908+
cosmic::iced::Event::Keyboard(iced::keyboard::Event::KeyPressed {
909+
key,
910+
text,
911+
modifiers,
912+
..
913+
}) => match key {
907914
Key::Character(_)
908915
if matches!(status, Status::Ignored)
909916
&& modifiers.is_empty()

0 commit comments

Comments
 (0)