prefer symbols to descriptions for hotkey names

develop
Myk Taylor 2023-06-15 01:35:48 -07:00
parent 840a2b3525
commit f7bef53b42
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 6 additions and 4 deletions

@ -598,10 +598,12 @@ std::set<df::interface_key> Screen::add_text_keys(const std::set<df::interface_k
string Screen::getKeyDisplay(df::interface_key key) string Screen::getKeyDisplay(df::interface_key key)
{ {
if (enabler) int c = keyToChar(key);
if (c != -1)
return string(1, c);
if (key >= df::interface_key::CUSTOM_SHIFT_A && key <= df::interface_key::CUSTOM_SHIFT_Z)
return string(1, 'A' + (key - df::interface_key::CUSTOM_SHIFT_A));
return enabler->GetKeyDisplay(key); return enabler->GetKeyDisplay(key);
return "?";
} }
int Screen::keyToChar(df::interface_key key) int Screen::keyToChar(df::interface_key key)