Fix CTRL/META state display in test/handle_keys.cxx (macOS)

This changes only the display of the mentioned state bits in the test
program, and only on macOS.

Thanks to Manolo for finding and reporting this.
This commit is contained in:
Albrecht Schlosser 2024-08-23 17:13:15 +02:00
parent a0a91d4854
commit d6ddc62b33

View File

@ -228,7 +228,7 @@ int app::handle(int ev) {
const char *etxt = Fl::event_text(); const char *etxt = Fl::event_text();
int ekey = Fl::event_key(); int ekey = Fl::event_key();
int elen = Fl::event_length(); int elen = Fl::event_length();
char ctrl = (Fl::event_state() & FL_COMMAND) ? 'C' : '.'; char ctrl = (Fl::event_state() & FL_CTRL) ? 'C' : '.';
char alt = (Fl::event_state() & FL_ALT) ? 'A' : '.'; char alt = (Fl::event_state() & FL_ALT) ? 'A' : '.';
char shift = (Fl::event_state() & FL_SHIFT) ? 'S' : '.'; char shift = (Fl::event_state() & FL_SHIFT) ? 'S' : '.';
char meta = (Fl::event_state() & FL_META) ? 'M' : '.'; char meta = (Fl::event_state() & FL_META) ? 'M' : '.';