-
-
Notifications
You must be signed in to change notification settings - Fork 996
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
macOS: Option + Left / Right key handling #5793
Comments
As for out of the box I am not really comfortable with doing that. That said I am not completely averse to it, it would at the very least |
@kovidgoyal
As far as I know, there has been feedback from users that certain keys don't respond in the program (e.g. Neovim, Ctrl+Shift+6), which is why I think unnecessary default shortcut configurations should be minimized. If this is the final decision, then I think it will annoy some of the users who are already using kitty, and two more
I think it's acceptable to put this configuration suggestion in the FAQ (although not very often, so far), and I remember where in the documentation there are already some configuration suggestions for zsh. |
On Sun, Dec 18, 2022 at 06:33:41PM -0800, page-down wrote:
@kovidgoyal
I don't think more `send_text` should be added to the default configuration than is necessary, even for the so-called "out-of-the-box experience".
- As I tested, in the latest bash, fish, `Option+Left/Right` will move the cursor by word, out of box. zsh will be the only one of these three shells that does not have this action (key escape sequence) configured by default.
Interesting. So maybe the OP should report it to zsh then.
- These two default configurations will directly cause `bindkey "\e[1;3C" whatever-widget` ... to be unusable unless the user has already configured `clear_all_shortcuts yes`.
- Mimicking a particular terminal of a particular platform (just for a certain shell) should not be the goal of kitty. (Although the intention is to lower the barriers and enhance the experience.)
Well, I guess the place to do this is in the zsh shell integration.
Check if \e[1;3C and \e[1;3D are bound already and if not bind them.
|
I tested with bash and fish on macOS and neither of them reacts to the keys without extra configuration (if run inside kitty). |
Guys, can we get a comprehensive answer on this. Please run bash and |
Revert the changes you added.. if people wanna be picky let them. It works with a 5.2 bash release which will very likely never appear on any macOS sytem as Apple has declared bash to no longer be a supported shell in favour of zsh and is only shipping a 3.x release for compatibility with scripts. I'm of the opinion that behaving as the user on a certain platform expects instead of being an agnostic canary or requiring the user to manually install newer system shells is the better experience but apparently there's people with strong views on this and all I asked for was a pointer in the right direction which I found myself. |
I tested the latest bash and fish, and checked
@kovidgoyal
The biggest issue with the previous implementation was that under macOS it would not be possible to distinguish between I am not against this improvement, as long as the design concept of kitty is consistent, it is acceptable to me.
Users who use the latest version of the software should not be penalized.
I must say that my opinion is the same. This will make for a better out-of-the-box experience and make it easy for users to get started. If kitty is designed to cover these types of target users. |
Eh this issue is done and dusted. The keys are not mapped in kitty.conf |
Is your feature request related to a problem? Please describe.
It is indeed, and I am probably just not smart enough to figure out how to get this working in kitty.
The default macOS Terminal.app supports pressing Option + Left / Right to move the cursor by one word.
This is really useful for command line editing but when I try the same in kitty I get a
<ESC>[1;3D
and<ESC>[1;3C
inserted instead.Describe the solution you'd like
Ideally these word moves should work out-of-the-box on platforms that support it (e.g. macOS).
I am however aware that this doesn't only depend on the terminal but also on the shell running inside it.
Describe alternatives you've considered
I have a working alternative right now, however I'm not entirely sure how portable this is and why it works in the normal terminal app without.
Adding this to to a user's .zshrc will "fix" the behoviour:
Additional context
Kitty already seems to be aware of the "moveWord*" requests it receives from the NSEvent context:
The text was updated successfully, but these errors were encountered: