1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! A virtual testing device based on the vte/vt100 parser used in functional and documentation tests.

use crate::InputDevice;

pub struct VirtualInputDevice;

impl InputDevice for VirtualInputDevice {
    fn read(&mut self) -> crossterm::Result<crossterm::event::Event> {
        Ok(crossterm::event::Event::Key(
            crossterm::event::KeyEvent::new(
                crossterm::event::KeyCode::Enter,
                crossterm::event::KeyModifiers::NONE,
            ),
        ))
    }
}