Widgets/TextAreaWidget: Add Ctrl+A (select all) support

This commit is contained in:
Jérôme Leclercq 2021-11-28 20:21:21 +01:00
parent bb93209713
commit 8299a5a4bd
1 changed files with 10 additions and 0 deletions

View File

@ -165,6 +165,16 @@ namespace Nz
switch (key.virtualKey)
{
// Select All (Ctrl+A)
case Keyboard::VKey::A:
{
if (!key.control)
break;
SetSelection(Vector2ui::Zero(), Vector2ui(std::numeric_limits<unsigned int>::max(), std::numeric_limits<unsigned int>::max()));
return true;
}
// Copy (Ctrl+C)
case Keyboard::VKey::C:
{