Skip to content

incorrect handling of shift+pageup and shift+pagedown despite terminfo entries #4

@incertia

Description

@incertia

so the usual xterm has the following terminfo bit:

    kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D,
 -->kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kbs=^?,
    kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,

but shift+pageup and shift+pagedown appear to send escapes to our event loop triggering the following condition

      se c (VtyEvent (EvKey KEsc _))                         = halt c

there is a workaround that utilizes providing our own inputMap via

vtyConfig :: Config
vtyConfig = defaultConfig { inputMap = (Nothing, "\ESC[6;2~", EvKey KPageDown [MShift]) :
                                       (Nothing, "\ESC[5;2~", EvKey KPageUp [MShift]) :
                                       inputMap defaultConfig
                          }

but this seems unideal as these key streams are already mapped in the terminfo, which defaultConfig should consult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions