notcurses-input: document new -m option #2579

This commit is contained in:
nick black 2022-01-27 23:44:59 -05:00
parent 73224f03e9
commit b7bab3ca6d
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ notcurses-input - Read and display input events
# SYNOPSIS # SYNOPSIS
**notcurses-input** [**-v**] **notcurses-input** [**-v**] [**-m**]
# DESCRIPTION # DESCRIPTION
@ -28,9 +28,12 @@ of modifier indicators:
* '#'/'.': NumLock was or was not pressed. * '#'/'.': NumLock was or was not pressed.
* 'L'/'R'/'P'/'u': Key was a release, repeat, press, or of unknown type. * 'L'/'R'/'P'/'u': Key was a release, repeat, press, or of unknown type.
By default, mice events are enabled.
# OPTIONS # OPTIONS
**-v**: Increase verbosity. **-v**: Increase verbosity.
**-m**: Inhibit mice events.
# NOTES # NOTES

View File

@ -400,7 +400,7 @@ int input_demo(ncpp::NotCurses* nc) {
static void static void
usage(const char* arg0, FILE* fp){ usage(const char* arg0, FILE* fp){
fprintf(fp, "usage: %s [ -v ]\n", arg0); fprintf(fp, "usage: %s [ -v ] [ -m ]\n", arg0);
if(fp == stderr){ if(fp == stderr){
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -417,6 +417,7 @@ int main(int argc, char** argv){
nopts.margin_r = 2; nopts.margin_r = 2;
nopts.margin_b = 2; nopts.margin_b = 2;
nopts.loglevel = NCLOGLEVEL_ERROR; nopts.loglevel = NCLOGLEVEL_ERROR;
// FIXME handle -m to inhibit mice events
if(argc > 2){ if(argc > 2){
usage(argv[0], stderr); usage(argv[0], stderr);
}else if(argc == 2){ }else if(argc == 2){