Skip to content

Conversation

@tmuaz
Copy link

@tmuaz tmuaz commented Dec 14, 2025

My implementation is a little crude, I'm open to any feedback to make changes to it before opening the PR.
fixes #983

self.insert_keybindings
.find_binding(modifier, KeyCode::Char(c))
.unwrap_or_else(|| {
if modifier == KeyModifiers::NONE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this part, with or without your changes. Do you have any clue?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, it seems to be handling inputs with key modifiers. His change checks for alt at the beginning and handles it like vim does there, then does the other checks reedline does already.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to just be checking if it can enter that key as a regular input (not handling cases where just the control modifier is held) and also making the key uppercase if shift is held.

My function does "consume" alt inputs (by flipping the alt bit) so checking if alt is pressed in that list is a bit redundant hence the comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean what's so special about ctrl + alt and ctrl + alt + shift? Why not just check whether shift is pressed? The comments before make me even more confused...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly not entirely sure but I've decided to keep the original logic in-case it's just something I don't understand

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.

vi mode: use alt + key to execute normal mode

3 participants