map ctrl+f to key_find (which does nothing)

This commit is contained in:
2025-03-29 08:33:33 -05:00
parent 075985caaf
commit 02f7828a08
3 changed files with 6 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ enum eSpecKey {
key_esc, key_enter, key_tab, key_help, // key_help should bind to the help key on Mac and the F1 key on Windows key_esc, key_enter, key_tab, key_help, // key_help should bind to the help key on Mac and the F1 key on Windows
key_bsp, key_del, key_home, key_end, key_pgup, key_pgdn, key_top, key_bottom, key_insert, key_bsp, key_del, key_home, key_end, key_pgup, key_pgdn, key_top, key_bottom, key_insert,
key_copy, key_cut, key_paste, key_selectall, key_undo, key_redo, key_copy, key_cut, key_paste, key_selectall, key_undo, key_redo,
key_word_left, key_word_right, key_word_bsp, key_word_del, key_none key_word_left, key_word_right, key_word_bsp, key_word_del, key_find, key_none
}; };
/// Represents a keypress. /// Represents a keypress.

View File

@@ -354,6 +354,7 @@ std::string cControl::getAttachedKeyDescription() const {
case key_word_bsp: keyName = "backspace"; mod += mod_ctrl; break; case key_word_bsp: keyName = "backspace"; mod += mod_ctrl; break;
case key_word_del: keyName = "delete"; mod += mod_ctrl; break; case key_word_del: keyName = "delete"; mod += mod_ctrl; break;
#endif #endif
case key_find: keyName = "f"; mod += mod_ctrl; break;
} }
if(mod_contains(mod, mod_ctrl)) s += '^'; if(mod_contains(mod, mod_ctrl)) s += '^';
if(mod_contains(mod, mod_alt)) s += '#'; if(mod_contains(mod, mod_alt)) s += '#';

View File

@@ -376,6 +376,9 @@ static cKey divineFunction(cKey key) {
} else if(key.c == 'y') { } else if(key.c == 'y') {
key.spec = true; key.spec = true;
key.k = key_redo; key.k = key_redo;
} else if(key.c == 'f') {
key.spec = true;
key.k = key_find;
} else { } else {
// Ctrl+random key: do nothing. Don't type the key. // Ctrl+random key: do nothing. Don't type the key.
key.spec = true; key.spec = true;
@@ -661,6 +664,7 @@ void cTextField::handleInput(cKey key, bool record) {
case key_tab: case key_tab:
case key_help: case key_help:
case key_insert: case key_insert:
case key_find:
break; break;
} }
// Setting the text normally resets insertion/selection point, but we don't want that here. // Setting the text normally resets insertion/selection point, but we don't want that here.