From 00c41f8b6d20217588d2965e44c9eae88ffee0c8 Mon Sep 17 00:00:00 2001 From: corvid Date: Tue, 25 Dec 2012 04:18:11 +0000 Subject: don't let form text input insert ^I, ^J, ^L, ^M In bug #1110, Alexander pointed out that it grabs ^L instead of letting it trigger focusing of the location bar. I note that the html5 draft currently insists that ^J and ^M not be permitted to find their way into the control's value. I imagine they could still be pasted in, but *shrugs*. --- dw/fltkui.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dw/fltkui.cc') diff --git a/dw/fltkui.cc b/dw/fltkui.cc index 4c3415c7..a43edf15 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -70,6 +70,10 @@ int CustInput2::handle(int e) } else if (k == 'd') { cut(position(), position()+1); return 1; + } else if (k == 'i' || k == 'j' || k == 'l' || k == 'm') { + // Fl_Input wants to "insert a few selected control characters + // literally", but this gets in the way of key commands. + return 0; } } return Fl_Input::handle(e); -- cgit v1.2.3