Skip to content

Commit 9a0db2c

Browse files
committed
alternative solution to address the undesired eye movements
1 parent aeb98fd commit 9a0db2c

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

crates/viewer/re_ui/src/command.rs

+2
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,8 @@ impl UICommand {
459459
egui_ctx.input_mut(|input| {
460460
for (kb_shortcut, command) in commands {
461461
if input.consume_shortcut(&kb_shortcut) {
462+
// Clear the shortcut key from input to prevent it from propagating to other UI component.
463+
input.keys_down.remove(&kb_shortcut.logical_key);
462464
return Some(command);
463465
}
464466
}

crates/viewer/re_view_spatial/src/eye.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,11 @@ impl ViewEye {
445445
return false; // e.g. we're typing in a TextField
446446
}
447447

448-
// Navigation should not be activated if any modifiers is pressed
449-
let modifiers_pressed = egui_ctx.input(|input| input.modifiers.any());
450-
if modifiers_pressed {
451-
return false;
452-
}
448+
// // Navigation should not be activated if any modifiers is pressed
449+
// let modifiers_pressed = egui_ctx.input(|input| input.modifiers.any());
450+
// if modifiers_pressed {
451+
// return false;
452+
// }
453453

454454
let mut did_interact = false;
455455
let mut requires_repaint = false;

crates/viewer/re_viewer/src/app.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -768,11 +768,11 @@ impl App {
768768
Some(re_log_types::StoreId::random(StoreKind::Recording))
769769
});
770770

771-
// Clear any shortcut input before firing up any UI components
772-
egui_ctx.input_mut(|input| {
773-
input.modifiers = Default::default();
774-
input.keys_down = Default::default();
775-
});
771+
// // Clear any shortcut input before firing up any UI components
772+
// egui_ctx.input_mut(|input| {
773+
// input.modifiers = Default::default();
774+
// input.keys_down = Default::default();
775+
// });
776776

777777
match cmd {
778778
UICommand::SaveRecording => {

0 commit comments

Comments
 (0)