mirror of https://github.com/TaKO8Ki/gobang
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
552 B
Rust
18 lines
552 B
Rust
use crate::app::{App, FocusBlock};
|
|
use crate::components::Component as _;
|
|
use crate::event::Key;
|
|
|
|
pub async fn handler(key: Key, app: &mut App) -> anyhow::Result<()> {
|
|
match key {
|
|
Key::Left => app.focus_block = FocusBlock::DabataseList,
|
|
Key::Char('c') => app.focus_block = FocusBlock::ConnectionList,
|
|
Key::Char('y') => {
|
|
if let Some(text) = app.structure_table.selected_cell() {
|
|
app.clipboard.store(text)
|
|
}
|
|
}
|
|
key => app.structure_table.event(key)?,
|
|
}
|
|
Ok(())
|
|
}
|