Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bind a few alternate function-key sequences#1621

Merged
rolandwalker merged 1 commit intomainfrom
RW/bind-alternate-function-key-sequences
Feb 24, 2026
Merged

Bind a few alternate function-key sequences#1621
rolandwalker merged 1 commit intomainfrom
RW/bind-alternate-function-key-sequences

Conversation

@rolandwalker
Copy link
Contributor

Description

There are many possible sequences for function keys on different terminals. These happen to not be bound by default in prompt_toolkit.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Feb 24, 2026
@github-actions
Copy link

Findings

  1. Minor correctness/docs: The alternate F3 handler toggles multi_line but the docstring says “SmartCompletion Mode.” This is misleading and could cause confusion during maintenance. Update the docstring to “Multiline Mode” to match behavior. mycli/key_bindings.py:52

Tests

  1. No tests cover key bindings. Consider adding a small unit test that builds KeyBindings and asserts both the canonical and alternate sequences trigger the same toggles for F2–F4. That will lock in the new behavior and guard regressions. mycli/key_bindings.py

No security concerns found.

There are many possible sequences for function keys on different
terminals.  These happen to not be bound by default in prompt_toolkit.
@rolandwalker rolandwalker force-pushed the RW/bind-alternate-function-key-sequences branch from 1007c02 to 366fb77 Compare February 24, 2026 10:38
@rolandwalker rolandwalker merged commit 831d7af into main Feb 24, 2026
8 checks passed
@rolandwalker rolandwalker deleted the RW/bind-alternate-function-key-sequences branch February 24, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants