1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-03 22:35:50 +03:00
Этот коммит содержится в:
cstef
2024-02-27 15:56:42 +01:00
родитель 4cc1ecaed9
Коммит 38df8592fb

Просмотреть файл

@@ -7,6 +7,8 @@ mod termwiz;
#[cfg(feature = "arbitrary")]
use arbitrary::Arbitrary;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
/// Backend-agnostic key input kind.
///
@@ -14,6 +16,7 @@ use arbitrary::Arbitrary;
#[non_exhaustive]
#[derive(Clone, Copy, Debug, PartialEq, Hash)]
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum Key {
/// Normal letter key input
Char(char),
@@ -102,6 +105,7 @@ impl Default for Key {
/// ```
#[derive(Debug, Clone, Default, PartialEq, Hash)]
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Input {
/// Typed key.
pub key: Key,