aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
diff options
context:
space:
mode:
authorMax Horn2011-05-17 16:27:10 +0200
committerMax Horn2011-05-17 16:27:10 +0200
commit52d81727a3c4ee5a5737b10366951021066eda13 (patch)
tree8c6205b7e44da43a1cce96bcd3d06e3b077513e0 /gui/widgets
parentd0209228467f548e748146e1c72e72ac9cccc89f (diff)
downloadscummvm-rg350-52d81727a3c4ee5a5737b10366951021066eda13.tar.gz
scummvm-rg350-52d81727a3c4ee5a5737b10366951021066eda13.tar.bz2
scummvm-rg350-52d81727a3c4ee5a5737b10366951021066eda13.zip
GUI: Trying to clarify my comment on ctrl-a/ctrl-e *sigh*
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/editable.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index de331d9cc2..4a0ee54828 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -182,9 +182,19 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) {
break;
#ifdef MACOSX
- // Mac OS X GUI style shortcuts: Ctrl-A goes to start of line, Ctrl-e to end of line.
- // TODO: Should we disable these on Windows? There, Ctrl-A usually means
- // "select all".
+ // Let ctrl-a / ctrl-e move the caret to the start / end of the line.
+ //
+ // These shortcuts go back a long time for command line programs. As
+ // for edit fields in GUIs, they are supported natively on Mac OS X,
+ // which is why I enabled these shortcuts there.
+ // On other systems (Windows, Gnome), Ctrl-A by default means
+ // "select all", which is why I didn't enable the shortcuts there
+ // for now, to avoid potential confusion.
+ //
+ // But since we don't support text selection, and since at least Gnome
+ // can be configured to also support ctrl-a and ctrl-e, we may want
+ // to extend this code to other targets, maybe even all. I'll leave
+ // this to other porters to decide, though.
case Common::KEYCODE_a:
case Common::KEYCODE_e:
if (state.flags & Common::KBD_CTRL) {