don't add keys as text when ctrl or alt are pressed

develop
Myk Taylor 2023-08-11 12:54:49 -07:00
parent fa22f9521a
commit 8d8c139ccb
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

@ -589,7 +589,7 @@ std::set<df::interface_key> Screen::normalize_text_keys(const std::set<df::inter
std::set<df::interface_key> combined_keys; std::set<df::interface_key> combined_keys;
std::copy_if(keys.begin(), keys.end(), std::inserter(combined_keys, combined_keys.begin()), std::copy_if(keys.begin(), keys.end(), std::inserter(combined_keys, combined_keys.begin()),
[](df::interface_key k){ return k <= df::interface_key::STRING_A000 || k > df::interface_key::STRING_A255; } ); [](df::interface_key k){ return k <= df::interface_key::STRING_A000 || k > df::interface_key::STRING_A255; } );
if (df::global::enabler->last_text_input[0]) { if (!(Core::getInstance().getModstate() & (DFH_MOD_CTRL | DFH_MOD_ALT)) && df::global::enabler->last_text_input[0]) {
char c = df::global::enabler->last_text_input[0]; char c = df::global::enabler->last_text_input[0];
df::interface_key key = charToKey(c); df::interface_key key = charToKey(c);
DEBUG(screen).print("adding character %c as interface key %ld\n", c, key); DEBUG(screen).print("adding character %c as interface key %ld\n", c, key);