mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
Merge branch 'master' of https://github.com/Lucky4Luuk/beammp_rust_server
This commit is contained in:
commit
6e7b2e0525
@ -4,7 +4,7 @@ use std::collections::VecDeque;
|
|||||||
use log::Level;
|
use log::Level;
|
||||||
|
|
||||||
use crossterm::{
|
use crossterm::{
|
||||||
event::{self, KeyCode, KeyEventKind},
|
event::{self, KeyCode, KeyEventKind, KeyModifiers},
|
||||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||||
ExecutableCommand,
|
ExecutableCommand,
|
||||||
};
|
};
|
||||||
@ -94,7 +94,11 @@ impl Tui {
|
|||||||
if let event::Event::Key(key) = event::read()? {
|
if let event::Event::Key(key) = event::read()? {
|
||||||
if key.kind == KeyEventKind::Press {
|
if key.kind == KeyEventKind::Press {
|
||||||
match key.code {
|
match key.code {
|
||||||
|
KeyCode::Char(c) if key.modifiers.contains(KeyModifiers::CONTROL) => {
|
||||||
|
|
||||||
|
},
|
||||||
KeyCode::Char(c) => {
|
KeyCode::Char(c) => {
|
||||||
|
let c = if key.modifiers == KeyModifiers::SHIFT { c.to_ascii_uppercase() } else { c };
|
||||||
self.input.push(c);
|
self.input.push(c);
|
||||||
self.history_scroll = 0;
|
self.history_scroll = 0;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user