From b7bab3ca6df14b6734c480b30b1010f0909afd80 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 27 Jan 2022 23:44:59 -0500 Subject: [PATCH] notcurses-input: document new -m option #2579 --- doc/man/man1/notcurses-input.1.md | 5 ++++- src/input/input.cpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/man/man1/notcurses-input.1.md b/doc/man/man1/notcurses-input.1.md index 7fb4ad3c1..8181a8d1f 100644 --- a/doc/man/man1/notcurses-input.1.md +++ b/doc/man/man1/notcurses-input.1.md @@ -8,7 +8,7 @@ notcurses-input - Read and display input events # SYNOPSIS -**notcurses-input** [**-v**] +**notcurses-input** [**-v**] [**-m**] # DESCRIPTION @@ -28,9 +28,12 @@ of modifier indicators: * '#'/'.': NumLock was or was not pressed. * 'L'/'R'/'P'/'u': Key was a release, repeat, press, or of unknown type. +By default, mice events are enabled. + # OPTIONS **-v**: Increase verbosity. +**-m**: Inhibit mice events. # NOTES diff --git a/src/input/input.cpp b/src/input/input.cpp index 12665e6f6..b8e122903 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -400,7 +400,7 @@ int input_demo(ncpp::NotCurses* nc) { static void usage(const char* arg0, FILE* fp){ - fprintf(fp, "usage: %s [ -v ]\n", arg0); + fprintf(fp, "usage: %s [ -v ] [ -m ]\n", arg0); if(fp == stderr){ exit(EXIT_FAILURE); } @@ -417,6 +417,7 @@ int main(int argc, char** argv){ nopts.margin_r = 2; nopts.margin_b = 2; nopts.loglevel = NCLOGLEVEL_ERROR; + // FIXME handle -m to inhibit mice events if(argc > 2){ usage(argv[0], stderr); }else if(argc == 2){