diff --git a/MetersPanel.c b/MetersPanel.c index c76603f3..22449f3d 100644 --- a/MetersPanel.c +++ b/MetersPanel.c @@ -33,13 +33,17 @@ struct MetersPanel_ { // Note: In code the meters are known to have bar/text/graph "Modes", but in UI // we call them "Styles". -static const char* MetersFunctions[] = {"Style ", "Move ", "Delete", "Done ", NULL}; -static const char* MetersKeys[] = {"Space", "Enter", "Del", "Esc"}; -static int MetersEvents[] = {' ', 13, KEY_DC, 27}; +static const char* MetersFunctions[] = {"Style ", "Move ", " ", "Delete", "Done ", NULL}; +static const char* MetersKeys[] = {"Space", "Enter", " ", "Del", "F10"}; +static int MetersEvents[] = {' ', 13, ERR, KEY_DC, KEY_F(10)}; -static const char* MetersMovingFunctions[] = {"Up ", "Down ", "Left ", "Right ", "Confirm", "Delete", "Done ", NULL}; -static const char* MetersMovingKeys[] = {"Up", "Dn", "Lt", "Rt", "Enter", "Del", "Esc"}; -static int MetersMovingEvents[] = {KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, 13, KEY_DC, 27}; +// We avoid UTF-8 arrows ← → here as they might display full-width on Chinese +// terminals, breaking our aligning. +// In , arrows (U+2019..U+2199) are +// considered "Ambiguous characters". +static const char* MetersMovingFunctions[] = {"Style ", "Lock ", "Up ", "Down ", "Left ", "Right ", " ", "Delete", "Done ", NULL}; +static const char* MetersMovingKeys[] = {"Space", "Enter", "Up", "Dn", "<-", "->", " ", "Del", "F10"}; +static int MetersMovingEvents[] = {' ', 13, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, ERR, KEY_DC, KEY_F(10)}; static FunctionBar* Meters_movingBar = NULL; static void MetersPanel_delete(Object* object) { diff --git a/MetersPanel.h b/MetersPanel.h index b012869f..e00169c8 100644 --- a/MetersPanel.h +++ b/MetersPanel.h @@ -29,6 +29,10 @@ struct MetersPanel_ { // Note: In code the meters are known to have bar/text/graph "Modes", but in UI // we call them "Styles". +// We avoid UTF-8 arrows ← → here as they might display full-width on Chinese +// terminals, breaking our aligning. +// In , arrows (U+2019..U+2199) are +// considered "Ambiguous characters". void MetersPanel_setMoving(MetersPanel* this, bool moving);