mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 00:23:35 +00:00
Add Ctrl+A (or Cmd+A) to select the whole text in ui::Entry
This commit is contained in:
parent
24c3c3e3a3
commit
f7465771b0
@ -277,6 +277,7 @@ bool Entry::onProcessMessage(Message* msg)
|
||||
case kKeyX: cmd = EntryCmd::Cut; break;
|
||||
case kKeyC: cmd = EntryCmd::Copy; break;
|
||||
case kKeyV: cmd = EntryCmd::Paste; break;
|
||||
case kKeyA: cmd = EntryCmd::SelectAll; break;
|
||||
}
|
||||
}
|
||||
else if (getManager()->isFocusMovementKey(msg)) {
|
||||
@ -653,6 +654,10 @@ void Entry::executeCmd(EntryCmd cmd, int unicodeChar, bool shift_pressed)
|
||||
|
||||
m_select = -1;
|
||||
break;
|
||||
|
||||
case EntryCmd::SelectAll:
|
||||
selectAllText();
|
||||
break;
|
||||
}
|
||||
|
||||
std::string newText = base::to_utf8(text);
|
||||
|
@ -70,6 +70,7 @@ namespace ui {
|
||||
Cut,
|
||||
Copy,
|
||||
Paste,
|
||||
SelectAll,
|
||||
};
|
||||
|
||||
int getCaretFromMouse(MouseMessage* mousemsg);
|
||||
|
Loading…
Reference in New Issue
Block a user