From 5a28371b18bc31619798b3fdaeffc3dec6df575d Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Wed, 26 Jul 2023 20:00:23 +0800 Subject: [PATCH] Fix command docs deployment for `input listen` (#9805) Fix command docs deployment for `input listen`, for more detail check: https://github.com/nushell/nushell.github.io/pull/987 --- crates/nu-command/src/platform/input/input_listen.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/nu-command/src/platform/input/input_listen.rs b/crates/nu-command/src/platform/input/input_listen.rs index 5ffa6f54aa..fa55ba8068 100644 --- a/crates/nu-command/src/platform/input/input_listen.rs +++ b/crates/nu-command/src/platform/input/input_listen.rs @@ -54,13 +54,15 @@ impl Command for InputListen { fn extra_usage(&self) -> &str { r#"There are 5 different type of events: focus, key, mouse, paste, resize. Each will produce a corresponding record, distinguished by type field: +``` { type: focus event: (gained|lost) } { type: key key_type: code: modifiers: [ ... ] } { type: mouse col: row: kind: modifiers: [ ... ] } { type: paste content: } { type: resize col: row: } -There are 6 variants: shift, control, alt, super, hyper, meta. -There are 4 variants: +``` +There are 6 `modifier` variants: shift, control, alt, super, hyper, meta. +There are 4 `key_type` variants: f - f1, f2, f3 ... keys char - alphanumeric and special symbols (a, A, 1, $ ...) media - dedicated media keys (play, pause, tracknext ...)