-
Notifications
You must be signed in to change notification settings - Fork 184
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
Unable to do Meta-Left or Meta-Right #318
Comments
I guess it is for historical reason: see linenoise keys On macOs (iterm2), typing meta-letf (Esc + Left) gives:
On Archlinux VM, typing meta-left moves to the start of word. |
Just for reference: |
I think meta-left/meta-right works in macOS for linefeed. |
|
By default, both Terminal.app and iTerm2.app are configured to sent |
Hmm, my iTerm does That said, Terminal.app does behave as you describe for me ( |
From a Windows perspective, it makes sense to separate key code and modifiers. |
Not entirely true, see: https://github.com/kkawakam/rustyline/pull/333/files#diff-0655ced7de6892bafa1f0000619c718eR327-R330 (and linked page). In practice I think terms tend to only send meta or alt though, and so that code just treats any Meta/Alt presses it gets the same. I think you're right for non-special keys though. (I think this issue is about neither working on macos though -- since it really just has |
Version 7.0.0 released |
The current implementation of
KeyPress
only allows Meta to take achar
rather than anotherKeyPress
, which also has aKeyPress::Char(char)
variant, and as such it disallows multi char control sequences. On OSX if one wishes to implement Ctrl+Left or Ctrl+Right functionality for a terminal shell the equivalent is Meta+Left and Meta+Right as the prior functionality is bound to switching workspaces.Would having it take a
KeyPress
be reasonable? I see that things likeKeyPress::ControlLeft
exist but this seems less flexible rather than allowing some command modifier taking anotherKeyPress
or multiple of them. Maybe I'm missing some architectural choice as to why it is this way, but I couldn't find anything in the issues or git log that would help me figure out why and have probably overlooked something here.The text was updated successfully, but these errors were encountered: