From 52d81727a3c4ee5a5737b10366951021066eda13 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 17 May 2011 16:27:10 +0200 Subject: GUI: Trying to clarify my comment on ctrl-a/ctrl-e *sigh* --- gui/widgets/editable.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'gui/widgets/editable.cpp') 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) { -- cgit v1.2.3