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

Add support for alternative arrow keys #40

Merged
merged 1 commit into from
Aug 7, 2023
Merged

Add support for alternative arrow keys #40

merged 1 commit into from
Aug 7, 2023

Conversation

jessarcher
Copy link
Member

@jessarcher jessarcher commented Aug 5, 2023

This PR adds support for alternative arrow key codes used in some scenarios.

Specifically, something called "Single Shift Three" (SS3). This Stack Exchange post does a pretty good job of explaining it, but essentially there are two escape sequences that can represent the directional keys.

Example from infocmp:

cuu1=\E[A
kcuu1=\EOA

And man termcap:

   cursor_up              cuu1                    up               up one line
   key_up                 kcuu1                   ku               up-arrow key

I'm not entirely sure what common scenarios would cause \EOA to be sent, but at least one user has reported this on 1 of 3 Macs with iTerm, and they've confirmed this fix.

Coming up with new names was a bit tricky, especially without renaming anything existing 🤷‍♀️

Fixes #31

@jessarcher jessarcher marked this pull request as ready for review August 6, 2023 00:13
@taylorotwell taylorotwell merged commit e65a276 into main Aug 7, 2023
@taylorotwell taylorotwell deleted the arrow-keys branch August 7, 2023 13:13
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.

The Select Component is not responding to the arrow keys
2 participants