From bd0c912a80a72f2c9a1701e510e53d3e2771247c Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 20 May 2025 23:34:25 +0200 Subject: Make Ctrl+A select input text The Emacs shortcut was overriding the FLTK behavior of selecting all input text. Fixes: https://github.com/dillo-browser/dillo/issues/400 --- src/ui.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ui.cc b/src/ui.cc index effd76cf..30e0a2d5 100644 --- a/src/ui.cc +++ b/src/ui.cc @@ -127,8 +127,8 @@ int CustInput::handle(int e) return 0; } } else if (modifier == FL_CTRL) { - if (k == 'a' || k == 'e') { - position(k == 'a' ? 0 : size()); + if (k == 'e') { + position(size()); return 1; } else if (k == 'k') { cut(position(), size()); @@ -136,7 +136,7 @@ int CustInput::handle(int e) } else if (k == 'd') { cut(position(), position()+1); return 1; - } else if (k == 'l') { + } else if (k == 'a' || k == 'l') { // Make text selected when already focused. position(size(), 0); return 1; -- cgit v1.2.3