IncrementalSearchBox: do not propagate unhandled keys to parent

Authored by mglb on Jul 12 2018, 12:49 AM.

Description

IncrementalSearchBox: do not propagate unhandled keys to parent

Summary:
When the focus is in IncrementalSearchBar, unhandled keys (i.e. those
not handled by text input box or unhandledMovementKeyPressed signal)
are sent to a program running in the terminal, which is probably not
what user expects. Example of propagated keys: Up, Down, PgUp, PgDown,
Fn, Tab.

This patch disables propagation. Shortcuts, movement keys, and keys
handled by search bar still works.

Test Plan:

  • Run cat
  • Open search box
  • Press Up/Down/PgUp/PgDown/Tab/Fn keys

Actual result: keys are sent to cat
Expected result: nothing should happen (implemented)
Alternative expected result: focus should move from text input to first
button

Regression test

Following keys/shortcuts should work:

  • Shift+Up/Down/PgUp/PgDown - terminal contents scrolling
  • Ctrl+Shift+T - open new tab (unless it was changed)
  • Enter - search next
  • Esc - close search box

Reviewers: Konsole, hindenburg

Reviewed By: Konsole, hindenburg

Subscribers: konsole-devel

Tags: Konsole

Differential Revision: https://phabricator.kde.org/D14037

Details