Function handle_hotkeys

Source
pub fn handle_hotkeys(ctx: &Context, state: &mut ToolsState) -> Option<Tool>
Expand description

V / T / D / M and Shift+S switch tools (Shift+S also steps through the shape variants; M steps through the mask variants), ignored while a text field has focus or an unlisted modifier is held. Bare S is snapping’s key (see handle_snap_hotkey), not a tool switch. Returns the new tool when it changed; the key is consumed, so calling this twice in a frame is harmless.