diff options
author | corvid <corvid@lavabit.com> | 2012-12-31 01:26:15 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2012-12-31 01:26:15 +0000 |
commit | 81f2a4b7bd6dbee681c09c69ac537a588395a79c (patch) | |
tree | 620a14d522c340a293f09a359c90051441679858 /src | |
parent | 432c6c244345bed34ec2ce811688b3063b93b387 (diff) |
apply recent form Input changes to findbar input as well
I held off on doing this to see whether I found myself expecting them to
work while using the findbar. At least in the case of Page_Up/Down, the
answer was certainly yes.
Diffstat (limited to 'src')
-rw-r--r-- | src/findbar.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index b72aefb6..d556a9c2 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -36,6 +36,10 @@ int MyInput::handle(int e) unsigned modifier = Fl::event_state() & (FL_SHIFT| FL_CTRL| FL_ALT|FL_META); if (e == FL_KEYBOARD) { + if (k == FL_Page_Down || k == FL_Page_Up || k == FL_Up || k == FL_Down) { + // Let them through for key commands and viewport motion. + return 0; + } if (modifier == FL_SHIFT) { if (k == FL_Left || k == FL_Right) { // Let these keys get to the UI @@ -51,6 +55,11 @@ int MyInput::handle(int e) } else if (k == 'd') { cut(position(), position()+1); return 1; + } else if (k == 'h' || k == 'i' || k == 'j' || k == 'l' || k == 'm') { + // Fl_Input wants to use ^H as backspace, and also "insert a few + // selected control characters literally", but this gets in the way + // of key commands. + return 0; } } else if (k == FL_Escape && modifier == 0) { // Avoid clearing the text with Esc, just hide the findbar. |