(&mut self, key: KeyEvent)
| 245 | // ── Key handling ── |
| 246 | |
| 247 | pub fn handle_key_event(&mut self, key: KeyEvent) -> Option<ProviderSelection> { |
| 248 | if !self.visible { |
| 249 | return None; |
| 250 | } |
| 251 | |
| 252 | match key.code { |
| 253 | KeyCode::Esc => { |
| 254 | self.hide(); |
| 255 | None |
| 256 | } |
| 257 | KeyCode::Enter => { |
| 258 | let result = self.confirm_selection(); |
| 259 | if result.is_some() { |
| 260 | self.hide(); |
| 261 | } |
| 262 | result |
| 263 | } |
| 264 | KeyCode::Up => { |
| 265 | self.move_up(); |
| 266 | None |
| 267 | } |
| 268 | KeyCode::Down => { |
| 269 | self.move_down(); |
| 270 | None |
| 271 | } |
| 272 | _ => None, |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | // ── Mouse handling ── |
| 277 |
nothing calls this directly
no test coverage detected