Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt or Ctrl + left/right arrows behaves incorrectly #149

Open
leviport opened this issue Feb 29, 2024 · 1 comment
Open

Alt or Ctrl + left/right arrows behaves incorrectly #149

leviport opened this issue Feb 29, 2024 · 1 comment
Milestone

Comments

@leviport
Copy link
Member

leviport commented Feb 29, 2024

Alt or Ctrl + left/right arrows should move the cursor forward or backward 1 word. Currently, it moves the cursor forward or backward by one character and inserts unwanted characters. Ctrl + arrows inserts ;5 and alt + arrows inserts ;3

To recreate:

  • In a terminal, type a few words separated by spaces
  • Hold alt or ctrl, then tap the left arrow

Version: 0.1.0~1709152706~22.04~36477e0

@Waridley
Copy link

Shift + arrows also doesn't select text as expected.

I'm interested in working on this, but I need a bit of guidance on where this behavior should be handled. I assume

Named::ArrowRight => {
if is_app_cursor {
ss3("C", mod_no)
} else {
csi("C", "", mod_no)
}
}
Named::ArrowLeft => {
if is_app_cursor {
ss3("D", mod_no)
} else {
csi("D", "", mod_no)
}
}
is doing exactly what it's supposed to, and those control codes should be received and handled somewhere else? I'm just not sure where control codes are actually turned into cursor and selection modifications. Clearly somewhere the codes for arrow keys without modifiers is being handled and moving the cursor, but it's failing to handle modifiers. I just don't know where that is.

@WatchMkr WatchMkr added this to the alpha 2 milestone May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Alpha 2
Development

No branches or pull requests

3 participants