only grab ignored keybinds
This commit is contained in:
parent
144fba3706
commit
0dc16e5d79
1 changed files with 45 additions and 45 deletions
90
src/main.rs
90
src/main.rs
|
|
@ -602,55 +602,55 @@ impl cosmic::Application for App {
|
||||||
match status {
|
match status {
|
||||||
event::Status::Ignored => {
|
event::Status::Ignored => {
|
||||||
match event {
|
match event {
|
||||||
iced::Event::Keyboard(event) => match event {
|
iced::Event::Keyboard(event) => match event {
|
||||||
iced::keyboard::Event::KeyReleased {
|
iced::keyboard::Event::KeyReleased {
|
||||||
key,
|
key,
|
||||||
modifiers,
|
modifiers,
|
||||||
..
|
..
|
||||||
} => Some(Message::Key(key, modifiers)),
|
} => Some(Message::Key(key, modifiers)),
|
||||||
iced::keyboard::Event::ModifiersChanged(
|
iced::keyboard::Event::ModifiersChanged(
|
||||||
modifiers,
|
modifiers,
|
||||||
) => Some(Message::ModifiersPressed(modifiers)),
|
) => Some(Message::ModifiersPressed(modifiers)),
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
iced::Event::Mouse(_event) => None,
|
iced::Event::Mouse(_event) => None,
|
||||||
iced::Event::Window(window_event) => {
|
iced::Event::Window(window_event) => {
|
||||||
match window_event {
|
match window_event {
|
||||||
window::Event::CloseRequested => {
|
window::Event::CloseRequested => {
|
||||||
debug!("Closing window");
|
debug!("Closing window");
|
||||||
Some(Message::CloseWindow(Some(id)))
|
Some(Message::CloseWindow(Some(id)))
|
||||||
|
}
|
||||||
|
window::Event::Opened { .. } => {
|
||||||
|
debug!(?window_event, ?id);
|
||||||
|
Some(Message::WindowOpened(id))
|
||||||
|
}
|
||||||
|
window::Event::Closed => {
|
||||||
|
debug!("Closed window");
|
||||||
|
Some(Message::WindowClosed(id))
|
||||||
|
}
|
||||||
|
window::Event::FileHovered(file) => {
|
||||||
|
debug!(?file);
|
||||||
|
None
|
||||||
|
}
|
||||||
|
window::Event::FileDropped(file) => {
|
||||||
|
debug!(?file);
|
||||||
|
None
|
||||||
|
}
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
window::Event::Opened { .. } => {
|
iced::Event::Touch(_touch) => None,
|
||||||
debug!(?window_event, ?id);
|
iced::Event::A11y(_id, _action_request) => None,
|
||||||
Some(Message::WindowOpened(id))
|
iced::Event::Dnd(dnd_event) => {
|
||||||
}
|
debug!(?dnd_event);
|
||||||
window::Event::Closed => {
|
|
||||||
debug!("Closed window");
|
|
||||||
Some(Message::WindowClosed(id))
|
|
||||||
}
|
|
||||||
window::Event::FileHovered(file) => {
|
|
||||||
debug!(?file);
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
window::Event::FileDropped(file) => {
|
iced::Event::PlatformSpecific(_platform_specific) => {
|
||||||
debug!(?file);
|
// debug!(?platform_specific);
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
_ => None,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iced::Event::Touch(_touch) => None,
|
|
||||||
iced::Event::A11y(_id, _action_request) => None,
|
|
||||||
iced::Event::Dnd(dnd_event) => {
|
|
||||||
debug!(?dnd_event);
|
|
||||||
None
|
|
||||||
}
|
|
||||||
iced::Event::PlatformSpecific(_platform_specific) => {
|
|
||||||
// debug!(?platform_specific);
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
event::Status::Captured => None,
|
event::Status::Captured => None,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -1631,9 +1631,9 @@ where
|
||||||
modifiers: Modifiers,
|
modifiers: Modifiers,
|
||||||
) -> Task<Message> {
|
) -> Task<Message> {
|
||||||
// debug!(?key, ?modifiers);
|
// debug!(?key, ?modifiers);
|
||||||
if self.editor_mode.is_some() {
|
// if self.editor_mode.is_some() {
|
||||||
return Task::none();
|
// return Task::none();
|
||||||
}
|
// }
|
||||||
if self.song_editor.editing() {
|
if self.song_editor.editing() {
|
||||||
return Task::none();
|
return Task::none();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue