Allow view-controlling keys in read-only mode

Authored by mglb on Mar 26 2018, 1:28 PM.

Description

Allow view-controlling keys in read-only mode

Summary:
Allow to use scrolling (Shift+Up/Down/PgUp/PgDown/Home/End) and a key
for showing URL hints when the view is in read-only mode.

Test Plan:

  • Prepare
    • Turn on scrollback
    • Set at least one modifier key for "Show URL hints" (edit profile → advanced)
    • Generate a few screens of text in Konsole
    • Display some URL (e.g. echo 'www.kde.org')
    • Display current time every second: while sleep 1; do printf '\r%s' "$(date)"; done
    • Turn on read-only mode
  • Patch tests
    • Hold down URL hint key - the URL should be underlined with square and a digit on the left
    • Press <URL-hint-key>+1 - the URL should open in a web browser
    • Scroll the view with Shift+Up/Down/PgUp/PgDown/Home/End - the view should scroll
    • Split the view, do previous test in each split - only currently active split should scroll
  • Regressions tests
    • Press different keys (including Ctrl+C, Ctrl+Z, etc; skip those mapped to Konsole actions) - nothing in terminal should happen
    • Press Ctrl+S - the time should not stop updating
    • Use IME to enter text - nothing in terminal should be shown

Reviewers: Konsole, hindenburg

Reviewed By: Konsole, hindenburg

Subscribers: hindenburg, Konsole

Tags: Konsole

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

(cherry picked from commit 2e086c852eac79b3ed2ef02710a86ba37807fcf9)

Details

Committed
hindenburgMar 28 2018, 1:08 PM
Reviewer
Konsole
Differential Revision
D11668: Allow view-controlling keys in read-only mode
Parents
R319:7cf147d2fa4b: initialize _currentTerminalDisplay
Branches
Unknown
Tags
Unknown