MCPcopy Index your code
hub / github.com/encounter/objdiff / enter_pressed

Function enter_pressed

objdiff-gui/src/hotkeys.rs:7–16  ·  view source on GitHub ↗
(ctx: &Context)

Source from the content-addressed store, hash-verified

5fn any_widget_focused(ctx: &Context) -> bool { ctx.memory(|mem| mem.focused().is_some()) }
6
7pub fn enter_pressed(ctx: &Context) -> bool {
8 if any_widget_focused(ctx) {
9 return false;
10 }
11 ctx.input_mut(|i| {
12 i.key_pressed(Key::Enter)
13 || i.key_pressed(Key::Space)
14 || i.pointer.button_pressed(PointerButton::Extra2)
15 })
16}
17
18pub fn back_pressed(ctx: &Context) -> bool {
19 if any_widget_focused(ctx) {

Callers 1

symbol_uiFunction · 0.85

Calls 1

any_widget_focusedFunction · 0.85

Tested by

no test coverage detected