From dc8c7d88260f9a8218845458da7f9b01fb39da82 Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 10 Jan 2022 01:11:00 -0500 Subject: [PATCH] [input] update ncinput_nomod_p() and future-proof it #2540 --- USAGE.md | 2 +- include/notcurses/notcurses.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/USAGE.md b/USAGE.md index 93c29777f..1d15c9377 100644 --- a/USAGE.md +++ b/USAGE.md @@ -729,7 +729,7 @@ notcurses_get_blocking(struct notcurses* n, ncinput* ni){ static inline bool ncinput_nomod_p(const ncinput* ni){ - return !ni->alt && !ni->ctrl && !ni->shift; + return !(ni->modifiers); } ``` diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index e39388686..ec8500f96 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -1231,7 +1231,7 @@ notcurses_get_blocking(struct notcurses* n, ncinput* ni){ // Was 'ni' free of modifiers? static inline bool ncinput_nomod_p(const ncinput* ni){ - return !(ni->alt | ni->ctrl | ni->shift); + return !(ni->modifiers); } #define NCMICE_NO_EVENTS 0