textbox ctrl+a

This commit is contained in:
MihailRis
2024-02-22 23:22:27 +03:00
parent 19b3c34eb2
commit 636ea2666f
2 changed files with 13 additions and 2 deletions
+11
View File
@@ -511,6 +511,17 @@ void TextBox::keyPressed(int key) {
paste(util::str2wstr_utf8(text));
}
}
// Select/deselect all
if (key == keycode::A) {
if (selectionStart == selectionEnd) {
selectionStart = 0;
selectionEnd = input.length();
selectionOrigin = 0;
setCaret(selectionEnd);
} else {
resetSelection();
}
}
}
}