Skip to content

Learn keys dialog: Deal with keypad vs. standalone variants #5043

@egmontkob

Description

@egmontkob

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version and build configuration

4.8.33, git

Operating system

.

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

How to reproduce

As per #4317 (comment):

Most terminals generate the same escape sequences for keypad vs. standalone keys (e.g. Keypad Home (7 with numlock off) vs. standalone Home key; same for pairs of End, PgUp/PgDn, Ins, Del, and the four arrows).

Some terminals however generate different ones.

How should the Learn keys dialog handle both cases, and be able to learn everything?

Currently it only asks for one (unspecified) variant. Meaning that in a few terminals, if the user teaches the key to mc and then presses the other variant during normal mc usage, it won't work.

The dialog could ask separately for both versions, but then in most terminals pressing one of them could highlight the "OK" next to the other one.

The UI should handle both kinds of terminals in a nice way, and be able to configure both kinds of terminals to their full extent, without knowing which kind of terminal it faces.

(It's unclear to me at this point how such a UI could look like. It's also unclear to me whether it will depend on which underlying architecture is chosen in the linked bug.)

Expected behavior

.

Actual behavior

.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: keybindKey bindingsprio: lowMinor problem or easily worked around

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions