https://bugs.kde.org/show_bug.cgi?id=524238

            Bug ID: 524238
           Summary: Konsole does not reply to DECRQM for supported DEC
                    private mode 1004
    Classification: Applications
           Product: konsole
      Version First 26.04.3
       Reported In:
          Platform: NixOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: emulation
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

Konsole supports enabling and disabling DEC private mode 1004, but it does
not reply when an application queries that mode with DECRQM.

STEPS TO REPRODUCE

1. Open a fresh Konsole shell.
2. Run this in a disposable shell or tab:

   (
     saved_stty=$(stty -g)
     trap 'stty "$saved_stty"' EXIT INT TERM
     stty -icanon -echo
     printf '\033[?1004l\033[?1004$p'
     timeout --foreground 3 cat -v
   )

OBSERVED RESULT

No response is printed before the timeout.

EXPECTED RESULT

Konsole replies that mode 1004 is reset:

    ^[[?1004;2$y

The DECRQM request and DECRPM response are documented in the xterm
control-sequence reference:
https://www.invisible-island.net/xterm/ctlseqs/ctlseqs.html

ADDITIONAL INFORMATION

Mode 1004 itself works. This command enables focus reporting:

   (
     saved_stty=$(stty -g)
     trap 'printf "\033[?1004l"; stty "$saved_stty"' EXIT INT TERM
     stty -icanon -echo
     printf '\033[?1004h'
     timeout --foreground 15 cat -v
   )

Switching away from Konsole and back produces ^[[O and ^[[I.

OpenTUI 0.4.5 queries mode 1004 with DECRQM and enables focus reporting only
after a positive reply. Konsole's missing reply therefore prevents focus events
from being enabled in OpenTUI applications. The reproducer, pseudo-terminal
capture, and synthetic-response test are recorded here:
https://github.com/anomalyco/opentui/issues/1333

Related bug 446893 asks Konsole to send the current focus state immediately
after enabling mode 1004. This report concerns the reply to CSI ? 1004 $ p:
https://bugs.kde.org/show_bug.cgi?id=446893

Current Konsole master handles CSI ? 1004 h and CSI ? 1004 l, but its CSI
dispatcher has no branch for the $ intermediate used by DECRQM:
https://invent.kde.org/utilities/konsole/-/blob/bd96482aca8ea005319bed7d91decd131bf573ac/src/Vt102Emulation.cpp#L559
https://invent.kde.org/utilities/konsole/-/blob/bd96482aca8ea005319bed7d91decd131bf573ac/src/Vt102Emulation.cpp#L2300

SOFTWARE/OS VERSIONS

Operating System: NixOS 26.11
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Konsole Version: 26.04.3
Kernel Version: 6.18.37 (64-bit)
Graphics Platform: Wayland

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to