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

Modifier key events have their modifier bits set differently on Linux vs OSX #6913

Closed
neurocyte opened this issue Dec 13, 2023 · 125 comments
Closed
Labels

Comments

@neurocyte
Copy link

neurocyte commented Dec 13, 2023

Edited by @kovidgoyal to add the poll:

We are discussing the best approach to take for fixing this issue, the two options are below with updated votes.

  1. The modifier bits should reflect the modifier state taking into account the current key event. This is the platform behavior of macOS , Windows and Qt ( @neurocyte @j4james @dankamongmen @kovidgoyal @rockorager )
  2. The modifier bits should reflect the modifier state as it was before the current key event. This is the platform behavior of Linux and GTK on Linux (havent been able to test GTK on other platforms). (@kchibisov @mitchellh)

(1) requires no changes to the existing kitty keyboard protocol beyond specifying the behavior. (2) requires adding a new "fake key code" and sending these events to update the modifier state.

Original issue is below:

On linux the modifier bit is clear on press events and set on release events. OSX is the other way around.

For example:

Linux:
LEFT_CONTROL PRESS
CSI 57442 u

ctrl+LEFT_CONTROL RELEASE
CSI 57442 ; 5 : 3 u

macOS:
ctrl+LEFT_CONTROL PRESS
CSI 57442 ; 5 u

LEFT_CONTROL RELEASE
CSI 57442 ; 1 : 3 u

This comes from a discussion with ghostty dev on which behaviour should be considered correct.

See: https://github.com/mitchellh/ghostty/issues/1082

@neurocyte neurocyte added the bug label Dec 13, 2023
@mitchellh

This comment was marked as outdated.

@mitchellh

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@mitchellh

This comment was marked as outdated.

@neurocyte

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@mitchellh

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@mitchellh

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@mitchellh

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kchibisov

This comment was marked as outdated.

@kovidgoyal

This comment was marked as outdated.

@kchibisov
Copy link

Option 1 without modifier for release I'd consider as compromise. At least firefox works like that on when you try event tester where they have shift attached for press, but never for release, even when you have multiple pressed. Maybe it's a firefox's Wayland issue though, but that's what I get:

image

This behavior can be done when your stack is doing 2.

@ngortheone
Copy link

ngortheone commented Dec 15, 2023

@kovidgoyal not a terminal app, but all Jetbrain's IDE's have Shift+Shift shortcut for Search Everywhere feature
https://blog.jetbrains.com/idea/2020/05/when-the-shift-hits-the-fan-search-everywhere/

EDIT:
And it is pretty popular feature. It is not crazy to think that some other app might want to mimic that.

@kovidgoyal
Copy link
Owner

kovidgoyal commented Dec 15, 2023 via email

@ngortheone
Copy link

ngortheone commented Dec 15, 2023

@kovidgoyal you asked for an example:

Still waiting for an actual example where you have bound shift+shift to do something in some application

So here you have it. I am sure there are plenty more if you care to open your mind and look around.

And have you ever held down shift then switched to the IDE and then pressed shift again?

This is not a fair question.

  • First of all, you are trying to appeal to me personally, but I can't speak for the majority of users. A poll "What does the user expect to happen" would be more appropriate.
  • Secondly, you are trying to re-enforce your case by leaning on the default broken behavior on some commercial platforms (OSX, Windows, and Qt which primarily caters to the first 2). The fact that these platforms behave that way does not mean it is the right way. We are doing opensource because we want to make software the right way, don't we? What you are suggesting is to accept badness that commercial platforms happened to have and propagate it to open source software. To me this goes against the spirit of opensource software. We can and should do better.
  • Third, the way your question is phrased suggests that if users are not doing this today - they shouldn't do it in the future, which ridiculous. Perhaps a mirror will help here: "have you ever used ESC in your terminal as a hot key or a as part of key combination? Wat? It doesn't work? Well, it means you shouldn't because some iterm or cmd.exe doesn't support it, and we decided it is for your own good"

Last, but not least, I'd like to question the very fact of your stewardship of the protocol.

  • You have demonstrated numerous times unprompted disrespect to other participants in this and related threads.
  • You have also expressed unfair and groundless critics of other platforms
  • You've unilaterally made changes to the protocol without discussing them with the community.
  • You continue pushing for option 1 even after realizing and admitting that it is technically impossible to implement on wayland.
  • You are trying to create a cross-platform protocol but actively discriminate against one major platform.

I don't think your judgement is sound and you are not acting in the interest of the entire community.

It's patently absurd to expect me to do all the work of creating the spec and then on top of that all the work for notifying your lazy ass

As a protocol steward this is exactly what you should do.

P.S. I will just aggregate some of your comments here:

...to put up with your crazy and badly designed protocol...
... And note that this protocol does not support sticky keys which is a linux only abomination....
... It's patently absurd to expect me to do all the work of creating the spec and then on top of that all the work for notifying your lazy ass.
...Tomorrow, when Linux people get bored of Wayland and invert FooBar display server that decides to implement keyboard events in some other fashion...

@gpanders
Copy link

gpanders commented Dec 16, 2023

@kovidgoyal not a terminal app, but all Jetbrain's IDE's have Shift+Shift shortcut for Search Everywhere feature https://blog.jetbrains.com/idea/2020/05/when-the-shift-hits-the-fan-search-everywhere/

EDIT: And it is pretty popular feature. It is not crazy to think that some other app might want to mimic that.

It looks like the JetBrains shortcut is pressing Shift twice in quick succession, which is different than what's being discussed in this issue (pressing both Shift keys simultaneously).


From reading the comments in this thread it seems to me that the division between options 1 and 2 is mostly to do with whether one cares more about key presses or key releases. Both options result in ambiguity in one or the other case (but only when dealing with the admittedly esoteric scenario of detecting simultaneous modifier keys).

With Option 1, there is ambiguity in the key press:

1. Shift key + Shift modifier  <-- First shift key pressed
2. Shift key + Shift modifier  <-- Second shift key pressed
3. Shift key + Shift modifier  <-- First shift key released
4. Shift key + No modifiers    <-- Second shift key released

Note that (1) and (2) are identical.

With Option 2, the situation is reversed:

1. Shift key + No modifiers    <-- First shift key pressed
2. Shift key + Shift modifier  <-- Second shift key pressed
3. Shift key + Shift modifier  <-- First shift key released
4. Shift key + Shift modifier  <-- Second shift key released

Now (3) and (4) are identical.

Now completely disregarding any issues about actual OS implementations or display protocols (which I admit I have essentially no knowledge of), could a 3rd option be a compromise between Options 1 and 2 where the modifier bits are set differently for key presses and key releases?

Thus for key press events we employ option 2 (modifier bits reflect the modifier state as it was before the current key event) and for key release events use option 1 (modifier bits reflect the modifier state taking into account the current key event).

@kovidgoyal
Copy link
Owner

kovidgoyal commented Dec 16, 2023 via email

@kovidgoyal
Copy link
Owner

@gpanders the problem is modifiers are treated as state in all the underlying platforms, independent of which key if any caused the state change.

Treating them differently in this protocol would basically be adding friction everywhere. The one outstanding issue here is tracking global modifier state changes independent of key events. No one has yet come up with a use case for this, but even if they did, the choice of (1) vs (2) is irrelevant to it, as it requires separate events that just set modifier state independent of key events. With those separate events both (1) and (2) would work fine.

Meanwhile (2) has the problem that in a networked context it introduces arbitrary latency between a key event and notification of the corresponding modifier state change. (1) does not suffer from this issue.

The issue with (1) is that it is theoretically true that it cant be implemented robustly in Linux. But practically it can be, as evidenced by the fact that Qt does exactly that and has been doing that for decades without any issues. The possible issues that implementing (1) in Wayland could cause are entirely theoretical and extremely unlikely. No one has presented any evidence to the contrary. It seems like some people just assume that because Linux is open source it must be better. Roll eyes.

And on the subject of Linux's keyboard protocol, I will even go so far as to say that treating global modifiers as state is fine, possibly a good thing, it allows for more use cases (even though they are not actual practical ones). However, not updating the modifier state in the key event that changes it is bad, particularly so in a networked context. These two issues are orthogonal. Linux could have had its global modifier state events and also updated modifier state in key events. It chose not to do that, and no one has presented any reason or justification for that. Personally I would guess its historical accident.

@kovidgoyal
Copy link
Owner

@gpanders Sorry I forgot to address your actual proposal while rambling :)

Your idea would certainly resolve the ambiguity but it would still be "impossible" to implement in Linux so it wont fix @kchibisov's objection. Basically, he will be satisfied only by forcing this protocol to follow linux and for terminal emulators to implement various hacks on other platforms to simulate linux instead of following the other platform's more sensible design and forcing terminal emulators to use various hacks to simulate their behavior on linux.

@kchibisov
Copy link

Basically, he will be satisfied only by forcing this protocol to follow linux and for terminal emulators to implement various hacks on other platforms to simulate linux instead of following the other platform's more sensible design and forcing terminal emulators to use various hacks to simulate their behavior on linux.

Maybe you don't actually read what I wrote where I said that I'm fine with doing 1 when you don't attach modifiers for releases at all, e.g. what I see in firefox and what you did initially as a compromise.

And as I said, the only issue I have with 1 is when everyone doing 2, is a lot of work when you need to do releases modifiers, since you need to track each key press user doing including latched modifier upon focus.

@kovidgoyal
Copy link
Owner

kovidgoyal commented Dec 16, 2023 via email

@kchibisov
Copy link

kchibisov commented Dec 16, 2023

I never did not report modifiers in release events. So not sure what you
are saying. I think you mean dont update modifier state in release
events?

See the picture here, alacritty/alacritty#7435 (comment) it's clearly kitty, and there's no control modifier for the first release. That behavior would be fine by me actually.

Edit: Ah, sorry, it's demo of kitty protocol on macOS in ghosty after your changes to spec, I got confused by the title of app.

Who is this everyone that is doing (2)?

I mean, toolkit used by terminal, like GTK, winit, etc. They all hide that from the user of the library, because they have 2 behavior, so you either need to get out of your way and patch them just to work with some terminal protocol, etc.

As for lot of work, I am fairly sure this can be implemented on Linux in about 20 lines of
C. Proof will be when I implement it.

I'm not denying the fact that it could be done in that amount of you work with libxkbcommon directly and self patch glfw. Do that in that amount in e.g. gtk 4.

@kovidgoyal
Copy link
Owner

kovidgoyal commented Dec 16, 2023

I never did not report modifiers in release events. So not sure what you
are saying. I think you mean dont update modifier state in release
events?

See the picture here, alacritty/alacritty#7435 (comment) it's clearly kitty, and there's no control modifier for the first release. That behavior would be fine by me actually.

kitty's current release behaves on Linux as (2) and macOS as (1) that is wha thtis issue is about. We want to settle on either (1) or (2) on all platforms.

Who is this everyone that is doing (2)?

I mean, toolkit used by terminal, like GTK, winit, etc. They all hide that from the user of the library, because they have 2 behavior, so you either need to get out of your way and patch them just to work with some terminal protocol, etc.

Qt is a toolkit used for many terminal emulators, off the top of my head, konsole, qterminal, contour. And it follows (1).

As for lot of work, I am fairly sure this can be implemented on Linux in about 20 lines of
C. Proof will be when I implement it.

I'm not denying the fact that it could be done in that amount of you work with libxkbcommon directly and self patch glfw. Do that in that amount in e.g. gtk 4.

No, I will implement it without patching glfw and not using libxkbcommon in the implementation. Essentially the logic is simply:

store the current state of the left/right modifier keys. And use that state to set the modifier bits only for modifier key events. For all other key events continue doing what you do currently.

This will implement (1) on Linux. And yes, it will fail for modifiers already pressed before focus change and if the wayland compositor decides to do something funky with modifier keys. As already discussed, these are both, theoretical and highly unlikely problems. And the failure applies only to the modifier bits associated with the actual modifier key events. All other key events are unaffected.

@gabyx
Copy link
Contributor

gabyx commented Dec 16, 2023

@kovidgoyal : I think your points are perfectly fine. At the end we want all a protocol which can be implemented on all platforms correctly, with of course some small drawbacks, and the latched key thing and focus change, and funky modifier changes inbetween are such drawbacks, which are ok IMO because tackeling would mean we do not reach the first goal which is far more important.

I have a question on the implementation, I maybe understanding things not quite right, but thats ok:
Could you explain what happens in your implementation on Wayland when we get a key press event CTRL_L (which is corresponding to ctrl modifier per default assumption in your keyboard layout in xkb..., we also know that Wayland sends modifier information after the key event CTRL_L which we do not have in this example).

So for (1) you would need to directly set the modifier bit ctrl when you kitty-encode this press event, right?
Are you saying that you detect the press of CTRL_L and then directly with your "state" know that you need a modifier ctrl to encode as well?

@gabyx
Copy link
Contributor

gabyx commented Dec 16, 2023

@kovidgoyal : Another thing: where is that protocol change recently which was mentioned? Any link to it? Thanks :-) Just interessted what changed, because that should be reflected in wezterm as well if we missed something etc...

@kovidgoyal
Copy link
Owner

@gabyx Yes I will basically force the assumption that the ctrl key will change the modifier state in the standard way. This will work fine if the user uses the standard mechanisms to remap the ctrl key as something else. That something else should be identified as the control key by libxkbcommon hopefully. More esoteric changes wont work, but they should be vanishingly rare and would anyway break the usage of the modifier bits to detect what key is a modifier. Fundamentally, on X11/Wayland modifier state is completely detached form keys. You can literally have anything change that state. X11/Linux wants to completely separate modifier state from key events treating them as separate things. This is fine in principle, but in the real world nothing actually works like that.

What protocol change are you talking of?

@gabyx
Copy link
Contributor

gabyx commented Dec 16, 2023

@kovidgoyal Does that mean you need to call xkb (after ctrl key has been pressed, or before starting up kitty) and gather the activated real modifier and use that one, once the user presses CTRL_L? If yes that basically means you do the same thing or something similar as the keyboard probing loop on wayland when kitty starts up, correct?. So the task is: which modifier from ctrl, shift, lock, mod1...mod5 is mapping to CTRL_L, such that you can kitty-encode this modifier when CTRL_L is pressed?

@kovidgoyal
Copy link
Owner

kovidgoyal commented Dec 17, 2023 via email

@kovidgoyal
Copy link
Owner

Voting was 5 to 2 in favor of (1). I have implemented (1) in master.

kchibisov added a commit to kchibisov/alacritty that referenced this issue Dec 24, 2023
While this doesn't handle releases with multiple identical modifiers
pressed, the release can't work reliable anyway, since one modifier
could be pressed before focusing the window, thus tracking modifiers
based on the keysym values won't work as it was suggested by kitty
author.

Links: kovidgoyal/kitty#6913
kchibisov added a commit to kchibisov/alacritty that referenced this issue Dec 24, 2023
While this doesn't handle releases with multiple identical modifiers
pressed, the release can't work reliable anyway, since one modifier
could be pressed before focusing the window, thus tracking modifiers
based on the keysym values won't work as it was suggested by kitty
author.

Links: kovidgoyal/kitty#6913
kchibisov added a commit to alacritty/alacritty that referenced this issue Dec 25, 2023
While this doesn't handle releases with multiple identical modifiers
pressed, the release can't work reliable anyway, since one modifier
could be pressed before focusing the window, thus tracking modifiers
based on the keysym values won't work as it was suggested by kitty
author.

Links: kovidgoyal/kitty#6913
chrisduerr pushed a commit to chrisduerr/alacritty that referenced this issue Dec 27, 2023
While this doesn't handle releases with multiple identical modifiers
pressed, the release can't work reliable anyway, since one modifier
could be pressed before focusing the window, thus tracking modifiers
based on the keysym values won't work as it was suggested by kitty
author.

Links: kovidgoyal/kitty#6913
chrisduerr pushed a commit to alacritty/alacritty that referenced this issue Dec 27, 2023
While this doesn't handle releases with multiple identical modifiers
pressed, the release can't work reliable anyway, since one modifier
could be pressed before focusing the window, thus tracking modifiers
based on the keysym values won't work as it was suggested by kitty
author.

Links: kovidgoyal/kitty#6913
neurocyte added a commit to neurocyte/flow that referenced this issue Mar 5, 2024
xiaogaozi added a commit to xiaogaozi/alacritty that referenced this issue May 24, 2024
* Bump development version to 0.13.0-dev

This is only an update to the development version and does not represent
a stable release.

* Update INSTALL.md Ubuntu instructions

* Add missing `ToggleMaximized` docs in the config

* Add `window.resize_increments` config option

Given how bugged the resize increments are on X11, it's better to
disable it by default.

* Relax horizontal scrolling

Apply horizontal scrolling when the angle between the axis X
and (x, y) vector is lower than 25 degrees.

Fixes alacritty#6711.

* Fix bracketed paste with EOT payload

This works around an issue in many (all?) shells where the bracketed
paste logic would only strip out `\r` but interpret EOT (`\x03`) as a
termination of the bracketed paste.

* Send D&D input through paste action

Treating D&D like paste allows using D&D to input text into areas other
than the PTY, like the search bar.

* Fix busy rendering when the same warning persists

When the same warning is thrown on the each rendering iteration, it'll
force alacritty to always render.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Bump winit to 0.28.2

This also bumps copypasta and sctk-adwaita.

Fixes alacritty#6744.
Fixes alacritty#6702.
Fixes alacritty#6696.
Fixes alacritty#2741.

* Bump x11-clipboard to v0.7.1

Fixes alacritty#6760.

* Use `thin` instead of `fat` LTO

The performance between `thin` and `fat` is in the margin of error,
however `thin` LTO is way faster to build.

* Improve fish completions installation instructions

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>

* Bump winit to 0.28.3

Fix macOS leak when closing the window.

* Fix `;` character in URI OSC 8 payload

The special character `;` can be not URL-encoded, thus it'll add
extra parameter in the payload. Handle it joining extra parameters
with the `;` as a separator.

* Bump CHANGELOG development version to 0.13.0-dev

This is only an update to the development version and does not represent
a stable release.

The original bump to 0.13.0-dev was made in 9cf2c89, but did not make
any changes to the changelog. This adds a 0.13.0-dev changelog entry to
master so new changes are properly added to the correct place.

* Fix selection rotation on the last line

This fixes an issue with terminal resizes when the selection is on the
last line. Alacritty would fail to rotate lines and keep the selection
in the same line index whenever the terminal line count was grown or
shrunk.

This issue occurred due to the range passed to the selection's rotate
function still being based on the old terminal size, which caused the
initial or target state of the rotation to be outside of the terminal
bounds.

Closes alacritty#6698.

* Add missing terminfo capabilities

This adds capabilities for focus in/out (XF, kxIN, kxOUT) and bracketed
paste (BD, BE, PE, PS).

* Reset char suppression for every key binding

Previously the character suppression was only reset whenever a key was
released. However this did not take key repetition into account.

Now every key down also resets the character suppression. This should
work since the `ReceivedCharacter` is always received immediately after
the `KeyboardInput` without the chance of a racing condition where
another keyboard event interrupts the two.

* Use paste for ESC action and IME commit

Route string terminal input through 'ActionContext::paste'
instead of char by char write improving performance by
utilizing bracketed paste mode when it's reasonable.

* Allow mode-exclusive bindings in any mode

This patch enables binding chains that go beyond mode changes by
allowing bindings to be defined for modes they do not usually have an
effect in.

* Omit urgency hint focused window

* Bump winit to 0.28.4

Fixes alacritty#6817.

* Add `ALACRITTY_EXTRA_LOG_TARGETS` env variable

This should help with troubleshooting the dependency crates like winit.

* Bump winit to 0.28.5

The 0.28.4 was yanked.

* Fix very long startup time on some Wayland systems

This is not a real fix for the issue given that dbus method sctk-adwaita
is using will being called anyway. The proper fix will be available
with the winit's 0.29.0 release.

Right now the delay reduced from around 20 seconds to 100ms on a
systems with broken xdg-desktop-portal setup.

* Bump `actions/checkout` to v3

Fix Node 12 deprecation warnings in action runs.

* Update glutin to 0.30.8 and winit to 0.28.6

Fixes alacritty#6920.
Fixes alacritty#6824.

* Fix upload from CI on windows

* Update bitflags to 2.2.1

* Update xdg and dirs crate

The recent version on xdg crate moved to home crate which is used
by cargo. Thus to query for home directory we can use the home
dependency instead which is smaller.

* Update clap to v4.2.7

Fixes alacritty#6879.
Fixes alacritty#6874.

* Update patch dependencies

* Improve renderer debuggability

Make the renderer more debuggable by adding extra logging and using
`GL_KHR_debug` when running with the debug log level.

* Add version 0.12.1 to CHANGELOG

* Switch to VTE's built-in ansi feature

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix 216-color cube generation

This fixes a regression introduced in cb7ad5b which swapped the green
and blue values when constructing the 216-color RGB cube.

Fixes alacritty#6951.

* Fix hyperlink preview for 2 lines terminal (alacritty#6953)

The intention was to show it, however it was hidden due to wrong
comparisson check.

* Move manpages to scdoc

This rewrites the existing manpages to use the `scdoc` format, making it
simpler to read and edit the manpages without intricate roff knowledge.

Some minor changes to the manpages were made in the process, mostly
focusing on correcting some of the wording. The list of maintainers has
also changed to ensure people not involved in the project anymore aren't
unnecessarily contacted for support.

* Fix Makefile manpage generation

Signed-off-by: Dennis Maier <d.maier94@web.de>
Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix crash on ScaleFactorChange on Windows

Windows is known to send zero sizes from winit in Risezed and now
in ScaleFactorChanged events. They were handled in Resized, but
not in ScaleFactorChanged.

Fixes alacritty#6949.

* Bump dependencies

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Add resolver to workspace manifest

This explicitly specifies resolver "2" in the root manifest, to fix a
warning introduced in a recent nightly release.

* Switch to TOML configuration format

This switches Alacritty's default configuration format from yaml to
toml. While yaml is still supported, it is done by converting it to toml
and should be removed entirely in the future.

All existing features were persisted based on my testing. Behavior
should not change much, though `--option` might have slightly different
behavior since the entire line is not interpreted as one line of toml.

A new `alacritty migrate` subcommand has been added which allows
automatic migration from yaml to toml. This also could be used as a
facility to automatically fix configuration file changes in the future.

Closes alacritty#6592.

* Change the way we refer to IRC chat

* Fix warnings for config imports

Closes alacritty#6996.

* Add option to persist hints after selection

Closes alacritty#6976.

* Fix `alacritty msg config` toml replacement

This fixes a regression introduced in bd49067 which broke the override
of configuration file variables using `alacritty msg config`.

To fix this the `replace` functionality was rewritten to behave more
like the `serde_utils::merge` where entire values are inserted into the
existing structure rather than separating the keys from the values.

Fixes: bd49067 (Switch to TOML configuration format)

* Fix freeze with some drivers when using GLX

Fixes alacritty#6972.

* Fix parsing of integer font sizes

Config file conversion broke parsing of the font size value if it's
written as an integer, since TOML integers are always signed.

* Add errors for deserializing with unknown fields

Currently there are still some places where `Deserialize` is used rather
than `ConfigDeserialize`, which means that the built-in warning for
unused fields is not emitted automatically.

To ensure users don't have invalid configurations, the
`#[serde(deny_unknown_fields)]` annotation has been added to these
structs, making it a hard error when an unknown field is present.

* Fix the crash when shrinking scrolled terminal

display_offset was adjusted unconditionally, thus it could go
beyound the history limits, so clamp it to history like we do
in grow_colums.

Fixes alacritty#6862.

* Add support for loading conpty.dll

Co-Authored-By: @fredizzimo
Co-Authored-By: @Grueslayer

* Update wix on the release CI

Fixes alacritty#6939.

* Add TOML migration recommendation to warning

This adds a little recommendation to use `alacritty migrate` to
automatically transition configuration files from YAML to TOML.

* Remove mouse double_click/triple_click options

Fixes alacritty#6962.

* Change the default colorscheme

The new colorscheme is base16 classic dark with the bright colors
generated with oklab toolkits. The base16 classic dark is less washed
out and represents the current maintainers preference. The motivation
to change it was subjective, though it does look like generic dark
theme.

On a side note, this colorscheme was used for alacritty.org web page for
a long time, however it used different foreground color.

* Add manpage links to "see also" section

* Add version 0.12.2 to CHANGELOG

This is only an update to the development version and does not represent
a stable release.

* Add a note in README about older versions

Unfortunately it's not clear to everyone that they are looking at the
development documentation.

* Fix legacy bindings taking precedence over new ones

They were compared by len, but it's was wrong from the start, since
a user provided binding could remove more than one builtin binding,
so it was impossible for users to use their own bindings.

The most reliable way to do so is to use `Option`, given that we fill
default during deserialization.

Fixes alacritty#7050.

* Update binding sections in config manpage

* Create man5 directory along with man1

* Update to the new winit keyboard API

The main highlight of this update is that alacritty will now use new
keyboard API from the winit, which resolves a lot of issues around
key bindings, such as ability to bind dead keys. It also fixes long
standing issues with the virtual key code bindings and make bindings
in general more predictable. It also makes our default Vi key bindings
fully working.

Given that alacritty was using `VirtualKey` directly in the bindings
from the winit, and winit simply removed the enum, we've added internal
conversions to minimize the fallout, but new way to specify the bindings
should be more intuitive.

Other part of this update fixes some forward compatibility bugs with the
Wayland backend, given that wayland-rs 0.30 is fully forward compatible.
The update also fixes weird Maximized startup issues on GNOME Wayland,
however they were present on any sane compositor.

Fixes alacritty#6842.
Fixes alacritty#6455.
Fixes alacritty#6184.
Fixes alacritty#5684.
Fixes alacritty#3574.
Fixes alacritty#3460.
Fixes alacritty#1336.
Fixes alacritty#892.
Fixes alacritty#458.
Fixes alacritty#55.

* Fix configuration link typo

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix `window.option_as_alt=Both`

Fixes alacritty#7077.

* Unset `XDG_ACTIVATION_TOKEN` in alacritty_terminal

This variable is what being used for Wayland's activation stuff.

* Raise double click threshold to 400ms

This should improve the situation with some touchpads. GTK4 is also
using the same value.

* Prefer logical key for named keys

Some keyboard layouts have named logical keys via shift combinations
of some sorts. So prefer them.

Fixes alacritty#7076.

* Mention all the actions in the man page

A lot of actions were left without a notice, so the only way to figure
out some of them was to browse source code. An example of such
actions were `Maximize` and `Minimize`, since we don't have a binding
for them, so they were left even in alacritty-bindings(5).

Explicitly list all the bindings we have. The search bindings were
also not accurately restricted, since we allow them to be executed
inside regardless of mode.

* Use lowercase latters in bindings for h/m/l

They were using uppercase latters, however our config expects everything
as lowercase, because we're using `key_without_modifiers` +
`ModifiersState`.

* Remove unnecessary mutable references

* Fix license syntax

This patch updates the license field to follow the SPDX 2.1 license
expression standard.

* Use bracketed paste only for multi-char IME input

Some IME setups do only `commit` single char input, like fcitx5 when
doing ru input.

* Fix manpage docs for shell section

Closes alacritty#7087.

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>

* Fix keys like `+` not working on neo layouts

The key_without_modifier removes all the modifiers including the
multiple shift levels, which is not desired. In alacritty we
just wanted to treat uppercase and lowercase latters the same,
which we can with the help of builtin functions.

* Mention `Forward`/`Back` mouse buttons in man page

They were mentioned only in the changelog, but forgotten in the man
page.

* Add `terminal` config section to control OSCs 

Some environments demand certain OSC sequences to be disabled or
some escape sequence could require handling which is out of scope
of alacritty, but could be done by external script (OSC 777).

Added section for now just handles the `OSC 52` sequence and changes
its default to be `OnlyCopy`, which is handy for remote copy, but
`Paste` is redundant because normal `Paste` hotkey could be used as
well.

Fixes alacritty#3386.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Skip whitespaces for wide chars in preedit

While we skip the spacers for the wide characters in the grid due to
them having a proper flags, the draw_string method was generating the
cells with incorrect flags leading to wide chars being cut off.

* Make URL_REGEX more strict

* Use ahash instead of fnv and regular hash function

After evaluation of the ahash with the data alacritty uses it was
discovered that it's 1.5-2x times faster when getting the already
hashed values, which is the primary cases for alacritty's renderer.

Given that ahash is generally faster, all the HashSet and HashMap's
inside the alacritty were changed to use it as a hasher function.

* Ignore scrolling multiplier on touchscreens

* Apply transparent background colors to "UI" cells

* Copy global IPC options for new windows

This patch stores all options set for the Window ID `-1` and
automatically applies them to new windows after their creation.

This in theory makes it possible to have a fully dynamic "default
config" without having to reapply it for every new window.

Closes alacritty#7128.

* Fix decorations_theme_variant spelling in manpage

* Remove winit dependency from alacritty_config

* Update regex-automata to v0.3.6

This seems like a sensible first step before looking into alacritty#7097.

* Fix crash with anchored searches

While this does **not** enable the use of anchors (`^`) in user regexes,
it does prevent Alacritty from crashing when attempting to do so.

* Change `window.padding` from u8 to u16

Fixes alacritty#6900.

* Quote `None` consistently inside the man page

`None` must be inside the `"`, since it's a string value.

* Add examples to more sections

Some sections were provided without a default, so provide an example for
them.

* Update winit to 0.29.1-beta

Make use of new winit frame throttling mechanism used in RedrawRequested,
which removes the need for having Wayland queue to ask for the frame
callbacks.

Fixes alacritty#7011.

* Add bindings for macOS tabs

This doesn't represnet the movement to add tabs on any other platform,
unless winit could add a similar API for them.

* Support startup notify on Wayland/X11

Activate a window to indicate that we want initial focus when the
system uses startup notifications.

Fixes alacritty#6931.

* Add `prefer_egl` debug option

Some systems have rendering issues when using GLX rather than EGL. While this is
usually due to a driver bug, it is helpful to provide a workaround for this by
allowing people to prefer EGL over GLX.

This patch adds the new `debug.prefer_egl` option to provide this workaround.

Closes alacritty#7056.

* Remove obsolete ansicode.txt file

The wiki contains a list of links to ANSI references:
https://github.com/alacritty/alacritty/wiki/ANSI-References

* Test man-pages compilation on the CI

* Add missing position config docs

* Fix regex memory usage

This fixes an issue where regexes with a large number of possible states
would consume excessive memory, since the entire DFA was compiled ahead
of time.

To solve this, the DFA is now built at runtime using `regex-automata`'s
hybrid DFA.

There are however still some checks performed ahead of time, causing
errors with obscenely large regexes (`[0-9A-Za-z]{999999999}`), which
shouldn't cause any issues.

A regex which is large, but not large enough to fail the NFA
construction (like `[0-9A-Za-z]{999999}`) will cause a long search of
the entire grid, but will complete and show the match.

Closes alacritty#7097.

* Underline hint matches during selection

This patch underlines the full regex hint match while the keyboard hint
selection is in process.

While it would be possible to color the entire match, this would only
introduce unnecessary configuration options and be too noisy. The
underline matches the mouse highlighting and has a less drastic visual
impact.

Closes alacritty#6178.

* Bump VTE to 0.12.0

Fixes alacritty#6845.

* Update the escape_support.md for sync updates

Remove the DCS sync updates escape sequence since it's no longer
supported.

Fixes: 47d5007 (Bump VTE to 0.12.0)

* Port from mio to polling

This patch replaces the mio crate with the polling. Now that
smol-rs/polling#96 has been merged, we should be at full feature parity
with mio v0.6 now.

Fixes alacritty#7104.
Fixes alacritty#6486.

* Update dependencies

This patch applies all breaking and non-breaking dependency updates
and bumps MSRV to 1.70.0.

* Fix PTY being closed on creation

The PTY got closed because `OwnedFd` automatically closed it.

Fixes: 59c63d3 (Update dependencies)

* Fix regex matches ending on multiline

This fixes an issue where the reverse search for the regex start would
truncate a character when ending on a newline, since it was omitting the
EOI check in that case.

This also fixes a separate issue which caused regexes which capture
empty strings (e.g.: `.*`) to always report a match.

This is a regression introduced in 73276b6.

* Fix regex patterns allowing for empty strings

This patch changes the mode we search for patterns which allow an empty
string, by anchoring all searches. As a result we will match the longest
possible match when multiple patterns are present (like `;*|rust`),
instead of using the leftmost pattern only.

This is only possible with empty matches since our parser is reset on
every byte anyway, so anchoring the search makes no difference.

Fixes alacritty#7276.

* Use openpty-rustix instead of nix

Follow upstream libraries and use rustix to reduce the amount of
dependencies in the future.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix `window.decorations_theme_variant` reload

The live reload handling wasn't introduced when the option got added.

Fixes alacritty#7295.

* Add inline vi mode search

This patch adds inline search to vi mode using `f`/`F` and `t`/`T` as
default bindings. The behavior matches that of vim.

Fixes alacritty#7203.

* Bump rustix to 0.38.20

* Update winit to 0.29.2 and copypasta to 0.10.0

Fixes alacritty#7236.
Fixes alacritty#7201.
Fixes alacritty#7146.
Fixes alacritty#6848.
Fixes alacritty#3601.
Fixes alacritty#3108.
Fixes alacritty#2453.

* Fix crash due to wrong drop order of clipboard

Fixes alacritty#7309.

* Prefer exact matches for bindings in mouse mode

Only consider bindings without Shift if there are no actions defined for the
actual mouse event.

Closes alacritty#7292.

* Fix typos

* Add version 0.12.3 to CHANGELOG

This is only an update to the development version and does not represent
a stable release.

* Avoid maximizing window when creating new tab

This patch ignores the startup mode when creating a new tab on macOS to
avoid maximizing an existing window.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix clippy warnings

* Add `window.blur` config option

Fixes alacritty#972.

* Add man 5 pages to upload_asset.sh

They are compiled, but not being uploaded.

* Bump glutin to 0.31.1

This fixes a crash on startup with macOS Sonoma.

* Fix crash when leaving search after resize

This fixes a crash which could occur when leaving search with a visible
match after shrinking the terminal height to be lower than the original
line the focused match was in.

Closes alacritty#7054.

* Bump ahash to 0.8.6

* Remove `alacritty_config` from alacritty_terminal

There's no need to force alacritty's user configuration on
other users of the crate, thus provide the options actually used
by alacritty_terminal itself.

* Fix cursor being hidden after reaching timeout

The timeout and blink events could be delivered at the same time,
so canceling blinking won't work and we'll still have an event.

* Use builtin font to draw powerline symbols

In addition to box drawing it was decided to also draw powerline
symbols, since those are quite common and rather simple to draw with
present box drawing infra.

* Unify CLI config override mechanisms

This patch changes the way the `-o` config option works when specified
at startup to function the same way as the IPC mechanism.

While this should technically perform the exact same way, it should
hopefully make it a little easier to understand how CLI config
replacement works.

* Add `--option` argument to `create-window`

This patch adds a new CLI parameter to the `create-window` subcommand,
matching the existing `--option` parameter when creating a new Alacritty
instance.

This parameter allows setting up the initial window configuration from
the CLI without having to call `alacritty msg config`, making sure that
all options are set appropriately right from the start.

Closes alacritty#6238.

* Change default `bell.animation` to `Linear`

The default animation feels really choppy, but it's just how its
function looks.

* Fix visual bell getting stuck on macOS

Fixes alacritty#7325.

* Fix message bar damage

Fixes alacritty#7224.

* Fix Sync capability in terminfo

Alacritty has supported mode 2026 for synchornized updates for a few
months, but the terminfo entry still used the old DCS sequence
originally supported by iTerm2. Since many other terminal emulators and
applications seem to be standardizing around 2026, change the terminfo
entry to use SM instead of DCS.

* Fix Vi cursor not being dirty when scrolling

* Simplify powerline drawing algorithm

Iterate over points in line instead of drawing it right away
and then finding it in the buffer.

Fixes: 4a26667 (Use builtin font to draw powerline symbols)

* Add error handling for OpenGL connection details

* Update VTE to 0.13.0

* Add support for DECRPM/DECRQM

* Damage only terminal inside `alacritty_terminal`

The damage tracking was including selection and vi_cursor which were
rendering viewport related, however all the damage tracking inside
the `alacritty_terminal` was _terminal viewport_ related, meaning that
it should be affected by `display_offset`.

Refactor the damage tracking so `alacritty_terminal` is only tracking
actual terminal updates and properly applying display offset to them,
while `alacritty` pulls this damage into its own UI damage state.

Fixes alacritty#7111.

* Create only one branch per major release

Having a separate branch for each release makes it harder to maintain
without an actual benefit, since every release from the major version
is linear, so creating branches doesn't make any sense.

They also collapse with the tag names leading to ambiguous refs.

* Make sections the same case in man pages

* Fix SelectLastTab in alacritty-bindings(5)

* Make man pages look consistent

Part of the man pages were using _value_, other part were using just
value, thus make everything as _value_.

Also properly dot terminate and add spacing through out the man pages.

* Explicitly use `=` in alacritty(5)

This should help with understanding how to write TOML
without reading too much into specification.

* Improve section to TOML section refs

This should give more hints where to put things.

* Add example for [window] section in alacritty(5)

This should give a hint on how to generally tweak things.

* Drop repo link in *SEE ALSO* man sections

The alacritty documentation is fully present inside the man pages, the
repo provides nothing extra other than a way to report issues, which
lives in its own section anyway.

* Fix default for [[hints.enabled]] in man pages

The default was incomplete, since `command` was missing.

* Add migrate to alacritty(1)

* Damage entire window on font size change

Font size could change without changing the cell dimensions, like
becoming slightly higher/wider.

Fixes: 40160c5 (Damage only terminal inside `alacritty_terminal`)

* Fix IME popup positioning

When setting cursor area, the popup will be placed either above or
below not obscuring the supplied region, however we were still
offsetting line with `+1` putting the cursor at the bottom of the line,
and given that area is from the top-left corner, the wrong area
was marked for not being obscured.

It was also discovered that some compositors, like GNOME, position
IME in the bottom right corner of the supplied region, which is wrong,
but it renders IME popup not very useful, since it's far away from
the place it should be, thus try to not obscure just a few characters
near the cursor.

Given that X11 doesn't support area setting, it uses the old logic
with offsetting.

Co-developed-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: lilydjwg <lilydjwg@gmail.com>

* Bump dependencies

Update dependencies with `cargo update` as well as do explicit update
of winit, crossfont, and regex-automata.

* Make AA stronger for undercurl

This improves undercurl rendering preserving its original thickness.
This also makes it look not out-of place when places next to other
lines.

* Document macOS shortcuts for search

* Adjust default Vi's SearchBackwards binding

We have the same policy with Shift for numbers.

* Fix DECRPM reporting

The DECRQM uses `p` to query, but the reply uses `y`.

Fixes alacritty#7397.

* Optimize undercurl shader

This removes the if and lowers amount of operations.

* Fallback to underline shader when dotted fails

Some hardware is just bad.

Fixes alacritty#7404.

* Don't use `::*` for enum variants in bindings

* Fix chars usage inside the mouse bindings

Fixes alacritty#7413.

* Implement kitty's keyboard protocol

The protocol enables robust key reporting for the applications, so
they could bind more keys and the user won't have collisions with
the normal control keys.

Links: https://sw.kovidgoyal.net/kitty/keyboard-protocol
Fixes alacritty#6378.

* Update to crossfont 0.6.0

* Fix trigger of normal bindings in mouse mode

We should ensure that the `Shift` is actually pressed when trying to
prefer regular bindings instead of the ones if we had Shift applied.

Fixes: 500b696 (Prefer exact matches for bindings in mouse mode)
Fixes alacritty#7415.

* Don't emit text for NamedKey without text repr

When the key doesn't have textual representation we shouldn't emit
the text for them, since they are processed via bindings.

Also, fix the logic to handle named keys with disambiguate without
special modes/modifiers.

Fixes alacritty#7423.

* Fix message bar not damaged when the same size

The regression was added due to `y` coordinate in OpenGL differs to
`y` inside the damage rectangles.

Fixes: 40160c5 (Damage only terminal inside `alacritty_terminal`)

* Bump crossfont to 0.7.0

* Alacritty version 0.13.0-rc1

* Add link to rendered config docs

This adds a link to alacritty.org's rendered configuration file
documentation.

* Fix the order of `ClearSelection` in Vi mode

Fixes alacritty#7438.

* Account for option_as_alt when doing kitty protocol

By default `Alt` is not a real `Alt` on macOS, so we shouldn't treat
it as a modifier.

Fixes alacritty#7443.

* Bump winit to 0.29.5

Fixes alacritty#7449.

* Keep IME always enabled on X11

Fixes alacritty#7195.

* Alacritty version 0.13.0-rc2

* Apply modifiers before presses in kitty protocol

While this doesn't handle releases with multiple identical modifiers
pressed, the release can't work reliable anyway, since one modifier
could be pressed before focusing the window, thus tracking modifiers
based on the keysym values won't work as it was suggested by kitty
author.

Links: kovidgoyal/kitty#6913

* Bump winit to 0.29.7

This also bumps other dependencies along the way.

Fixes alacritty#2886.

* Alacritty version 0.13.0

* Mark SimpleFullscreen as macOS only startup mode

* Derive `Clone` for `EventLoopSender`

* Fix `alacritty migrate` with nonexistent imports

Fixes alacritty#7473.

* Remove direct dependency on once_cell

With MSRV 1.70, std now contains the necessary parts.

* Use pre-composed key for `Alt` bindings on macOS

Fixes alacritty#7475.

* Fix inability to bind `Alt+Control` on Windows

Fixes alacritty#7506.

* Passthrough potential errors for `EventLoopSender`

* Don't substitute `\n` in char bindings

This broke unintentionally due to routing paste-like input
via paste function.

Fixes alacritty#7476.

* Send associated text for shifted numbers with kitty

Also fix the wrong ordering of base and shifted keys.

Fixes alacritty#7492.

* Powerline glyphs being cut for narrow fonts

Fixes alacritty#7470.

* Remove note about versions pre 0.13.0

* Bump winit to 0.29.8

Fixes alacritty#7514.
Fixes alacritty#7502.
Fixes alacritty#7494.
Fixes alacritty#7474.
Fixes alacritty#7472.

* Fix number-based mouse bindings

The toml migration introduced a regression which stopped numbered key
binding's from working. This patch implements the required number type
to make things work again.

Fixes alacritty#7527.

* Fix replacing optional fields

This fixes an issue with the default `SerdeReplace` implementation where
it would never recurse through options but always replace the entire
option with the new value.

Closes alacritty#7518.

* Add vi search paste bindings

Closes alacritty#7511.

* Ignore null values in `alacritty migrate`

This should help with broken YAML configurations by throwing nulls
away, which are not representable in toml.

* Bump winit to 0.29.9

Fixes alacritty#7559.
Fixes alacritty#7533.

* Fix serde tests without default features

* Alacritty version 0.13.1-rc1

* Fix manpage string escapes

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Alacritty version 0.13.1

* Reduce allocations during keyboard input

* Fix `debug.renderer="gles2pure"` documentation

Patch 5685ce8 changed the allowed values of the `debug.renderer` enum,
prohibiting the usage of `_` in the `Gles2Pure` variant. This patch
updates the documentation to correct for that.

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>

* Fix inline search expanding across newlines

Closes alacritty#7587.

* Fix env variable overrides through CLI

This fixes an issue where all CLI environment variables would replace
existing configuration file variables instead of merging the two maps
together.

Fixes alacritty#7618.

* Fix typo in config docs

Closes alacritty#7647.

* Allow specifying all config keys on all platforms

Closes alacritty#7592.

* Use builtin font to draw sextants

Sextants are similar to quadrants and should align with them and
other box drawing, thus use builtin font to align them properly.

Part-of: alacritty#7422.

* Fix invalid bounds in selection range conversion

* Don't report associated text only for C0/C1

This has a side effect that we'll have text reported for Alt+Shift+T
and similar, but only C0/C1 should be excluded and Alt+Shift+T is
emitting neither, thus regular `T` will be reported.

Fixes alacritty#7657.

* Move CHANGELOG entry for sextants to proper section

* Don't use kitty sequences outside protocol

Originally kitty defined that functional keys, which are not encoded
by default, like `Pause` should be encoded with `CSI u`. However
the specification was clarified and now it says that terminal
may ignore that part. Given that Alacritty tries to follow xterm/urxvt
when it comes to bindings, CSI u bindings are not send for consistency
reasons.

This also brings back F13-F20 bindings used by Alacritty in 0.12.3, as
well as explicitly defines `NumpadEnter` like it was before.

Closes alacritty#7623.

* Document `command` field in bindings

Closes alacritty#7594.

* Fix unnecessary explicit panic in PTY 

Closes alacritty#7680.

* Fix hang on startup with some Wayland compositors

Fixes alacritty#7665.

* Fix hang on startup with some Wayland compositors

Fixes alacritty#7665.

* Add default `Home`/`End` bindings for Vi mode

* Remove extra TIOCSWINSZ ioctl on startup

The openpty call already performs it, thus no need to call it one more
with the exact same size since it confuses some applications.

* Fix row indexing with inclusive ranges

* Use dynamic MSRV for oldstable CI

Instead of manually specifying the oldstable version in all our CI
scripts, it is now pulled from the `Cargo.toml` which simplifies the
update process.

The contributing guide has also been updated to not include the explicit
version and its wording has been loosened a bit to correctly represent
current maintenance practices.

* Bump MSRV to 1.72.0

* Fix clippy warnings

* Fix regional scrolling leaking into history

This fixes an issue where a scrolling region that does not start at the
top of the screen would still rotate lines into history when scrolling
the content "upwards".

* Fix typo in config docs

* Bump winit to 0.29.11

Fixes alacritty#7633.
Fixes alacritty#7613.
Fixes alacritty#7607.
Fixes alacritty#7571.
Fixes alacritty#7549.

* Fix feature = "cargo-clippy" deprecation

* Check alternative cursor icon names on Wayland

* Add alias support to `SerdeReplace`

* Bump winit to 0.29.12

The 0.29.11 was yanked.

* Fix build failure on NetBSD

x11-clipboard was unconditionally using eventfd which is not present
on NetBSD.

Links: quininer/x11-clipboard#48

* Fix log typos

* Bump winit to 0.29.14

Fixes alacritty#7806.

* Expose more process info on Windows

* Send exit code events on child process exit

Fixes alacritty#7753.

* Set PTY's pixel size on startup

117719b removed the extra call for TIOCSWINSZ, however the initial
`openpty` call itself did not set the pixel size, which caused issues
with some clients.

* Fix hint `Select` action for hyperlink escape

This fixes an issue where the `Select` action for hyperlink escape text
would select the entire line, instead of selecting only the hyperlink
itself.

It also changes the way hyperlinks with the same ID are highlighted,
removing the restriction of being on consecutive lines and instead
highlighting all visible cells that correspond to the matching
hyperlink.

Closes alacritty#7766.

* Bump winit to 0.29.15

* Bump dependencies

This bumps all dependencies that can be updated without introducing a
build failure.

* Drop MSRV to 1.70.0

* Allow setting terminal env vars via PTY options

Closes alacritty#7778.

* Alacritty version 0.13.2-rc1

* Fix kitty encoding used for char input without text

On Windows some key combinations for regular text input, like Ctrl+1
don't have any text attached, so they were generating the kitty escape
sequence even when they shouldn't.

* Fix msi installer build

This works around an issue where wix was pulling pre-release extensions
and thus breaking compatibility with our used wix version.

* Alacritty version 0.13.2

* Fix build

---------

Signed-off-by: Dennis Maier <d.maier94@web.de>
Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
Co-authored-by: Nathan Lilienthal <nathan@nixpulvis.com>
Co-authored-by: Christian Duerr <contact@christianduerr.com>
Co-authored-by: CRATO LABS <127831631+cratolabs@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Anhad Singh <62820092+Andy-Python-Programmer@users.noreply.github.com>
Co-authored-by: maierd <d.maier94@web.de>
Co-authored-by: Pavel Roskin <1317472+proski@users.noreply.github.com>
Co-authored-by: Sonu Bardai <67749330+SonuBardai@users.noreply.github.com>
Co-authored-by: Yug Shende <yugshende@gwu.edu>
Co-authored-by: Nick Reilingh <nreiling@bard.edu>
Co-authored-by: Andrea Frigido <frisoft@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: tv <tv@krebsco.de>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Arhum Jain <75106472+ArhumJain@users.noreply.github.com>
Co-authored-by: Rolf Sievert <26115145+RolfSievert@users.noreply.github.com>
Co-authored-by: Simone Ragusa <simoneragusa@duck.com>
Co-authored-by: John Nunley <jtnunley01@gmail.com>
Co-authored-by: Kyle Willmon <kylewillmon@gmail.com>
Co-authored-by: Julian Braha <julianbraha@gmail.com>
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Cédric Van Rompay <cedric.vanrompay@gmail.com>
Co-authored-by: Hyper <HyperHamster@users.noreply.github.com>
Co-authored-by: Philip Dubé <serprex@users.noreply.github.com>
Co-authored-by: Lars Francke <lars.francke@stackable.tech>
Co-authored-by: Omar Magdy <99906646+omagdy7@users.noreply.github.com>
Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: WuerfelDev <WuerfelDev@users.noreply.github.com>
Co-authored-by: Popa Ioan Alexandru <49609151+ALEX11BR@users.noreply.github.com>
Co-authored-by: Mohammad AlSaleh <CE.Mohammad.Alsaleh@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Alexandru Placinta <placintaalexandru1@gmail.com>
Co-authored-by: Yadi Abdalhalim <36752216+Ydot19@users.noreply.github.com>
Co-authored-by: Dimitris Apostolou <dimitris.apostolou@icloud.com>
Co-authored-by: Friz64 <friz64@protonmail.com>
Co-authored-by: huajin tong <137764712+thirdkeyword@users.noreply.github.com>
Co-authored-by: Small White <364772080@qq.com>
xiaogaozi added a commit to xiaogaozi/alacritty that referenced this issue Oct 23, 2024
* Add support for loading conpty.dll

Co-Authored-By: @fredizzimo
Co-Authored-By: @Grueslayer

* Update wix on the release CI

Fixes alacritty#6939.

* Add TOML migration recommendation to warning

This adds a little recommendation to use `alacritty migrate` to
automatically transition configuration files from YAML to TOML.

* Remove mouse double_click/triple_click options

Fixes alacritty#6962.

* Change the default colorscheme

The new colorscheme is base16 classic dark with the bright colors
generated with oklab toolkits. The base16 classic dark is less washed
out and represents the current maintainers preference. The motivation
to change it was subjective, though it does look like generic dark
theme.

On a side note, this colorscheme was used for alacritty.org web page for
a long time, however it used different foreground color.

* Add manpage links to "see also" section

* Add version 0.12.2 to CHANGELOG

This is only an update to the development version and does not represent
a stable release.

* Add a note in README about older versions

Unfortunately it's not clear to everyone that they are looking at the
development documentation.

* Fix legacy bindings taking precedence over new ones

They were compared by len, but it's was wrong from the start, since
a user provided binding could remove more than one builtin binding,
so it was impossible for users to use their own bindings.

The most reliable way to do so is to use `Option`, given that we fill
default during deserialization.

Fixes alacritty#7050.

* Update binding sections in config manpage

* Create man5 directory along with man1

* Update to the new winit keyboard API

The main highlight of this update is that alacritty will now use new
keyboard API from the winit, which resolves a lot of issues around
key bindings, such as ability to bind dead keys. It also fixes long
standing issues with the virtual key code bindings and make bindings
in general more predictable. It also makes our default Vi key bindings
fully working.

Given that alacritty was using `VirtualKey` directly in the bindings
from the winit, and winit simply removed the enum, we've added internal
conversions to minimize the fallout, but new way to specify the bindings
should be more intuitive.

Other part of this update fixes some forward compatibility bugs with the
Wayland backend, given that wayland-rs 0.30 is fully forward compatible.
The update also fixes weird Maximized startup issues on GNOME Wayland,
however they were present on any sane compositor.

Fixes alacritty#6842.
Fixes alacritty#6455.
Fixes alacritty#6184.
Fixes alacritty#5684.
Fixes alacritty#3574.
Fixes alacritty#3460.
Fixes alacritty#1336.
Fixes alacritty#892.
Fixes alacritty#458.
Fixes alacritty#55.

* Fix configuration link typo

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix `window.option_as_alt=Both`

Fixes alacritty#7077.

* Unset `XDG_ACTIVATION_TOKEN` in alacritty_terminal

This variable is what being used for Wayland's activation stuff.

* Raise double click threshold to 400ms

This should improve the situation with some touchpads. GTK4 is also
using the same value.

* Prefer logical key for named keys

Some keyboard layouts have named logical keys via shift combinations
of some sorts. So prefer them.

Fixes alacritty#7076.

* Mention all the actions in the man page

A lot of actions were left without a notice, so the only way to figure
out some of them was to browse source code. An example of such
actions were `Maximize` and `Minimize`, since we don't have a binding
for them, so they were left even in alacritty-bindings(5).

Explicitly list all the bindings we have. The search bindings were
also not accurately restricted, since we allow them to be executed
inside regardless of mode.

* Use lowercase latters in bindings for h/m/l

They were using uppercase latters, however our config expects everything
as lowercase, because we're using `key_without_modifiers` +
`ModifiersState`.

* Remove unnecessary mutable references

* Fix license syntax

This patch updates the license field to follow the SPDX 2.1 license
expression standard.

* Use bracketed paste only for multi-char IME input

Some IME setups do only `commit` single char input, like fcitx5 when
doing ru input.

* Fix manpage docs for shell section

Closes alacritty#7087.

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>

* Fix keys like `+` not working on neo layouts

The key_without_modifier removes all the modifiers including the
multiple shift levels, which is not desired. In alacritty we
just wanted to treat uppercase and lowercase latters the same,
which we can with the help of builtin functions.

* Mention `Forward`/`Back` mouse buttons in man page

They were mentioned only in the changelog, but forgotten in the man
page.

* Add `terminal` config section to control OSCs 

Some environments demand certain OSC sequences to be disabled or
some escape sequence could require handling which is out of scope
of alacritty, but could be done by external script (OSC 777).

Added section for now just handles the `OSC 52` sequence and changes
its default to be `OnlyCopy`, which is handy for remote copy, but
`Paste` is redundant because normal `Paste` hotkey could be used as
well.

Fixes alacritty#3386.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Skip whitespaces for wide chars in preedit

While we skip the spacers for the wide characters in the grid due to
them having a proper flags, the draw_string method was generating the
cells with incorrect flags leading to wide chars being cut off.

* Make URL_REGEX more strict

* Use ahash instead of fnv and regular hash function

After evaluation of the ahash with the data alacritty uses it was
discovered that it's 1.5-2x times faster when getting the already
hashed values, which is the primary cases for alacritty's renderer.

Given that ahash is generally faster, all the HashSet and HashMap's
inside the alacritty were changed to use it as a hasher function.

* Ignore scrolling multiplier on touchscreens

* Apply transparent background colors to "UI" cells

* Copy global IPC options for new windows

This patch stores all options set for the Window ID `-1` and
automatically applies them to new windows after their creation.

This in theory makes it possible to have a fully dynamic "default
config" without having to reapply it for every new window.

Closes alacritty#7128.

* Fix decorations_theme_variant spelling in manpage

* Remove winit dependency from alacritty_config

* Update regex-automata to v0.3.6

This seems like a sensible first step before looking into alacritty#7097.

* Fix crash with anchored searches

While this does **not** enable the use of anchors (`^`) in user regexes,
it does prevent Alacritty from crashing when attempting to do so.

* Change `window.padding` from u8 to u16

Fixes alacritty#6900.

* Quote `None` consistently inside the man page

`None` must be inside the `"`, since it's a string value.

* Add examples to more sections

Some sections were provided without a default, so provide an example for
them.

* Update winit to 0.29.1-beta

Make use of new winit frame throttling mechanism used in RedrawRequested,
which removes the need for having Wayland queue to ask for the frame
callbacks.

Fixes alacritty#7011.

* Add bindings for macOS tabs

This doesn't represnet the movement to add tabs on any other platform,
unless winit could add a similar API for them.

* Support startup notify on Wayland/X11

Activate a window to indicate that we want initial focus when the
system uses startup notifications.

Fixes alacritty#6931.

* Add `prefer_egl` debug option

Some systems have rendering issues when using GLX rather than EGL. While this is
usually due to a driver bug, it is helpful to provide a workaround for this by
allowing people to prefer EGL over GLX.

This patch adds the new `debug.prefer_egl` option to provide this workaround.

Closes alacritty#7056.

* Remove obsolete ansicode.txt file

The wiki contains a list of links to ANSI references:
https://github.com/alacritty/alacritty/wiki/ANSI-References

* Test man-pages compilation on the CI

* Add missing position config docs

* Fix regex memory usage

This fixes an issue where regexes with a large number of possible states
would consume excessive memory, since the entire DFA was compiled ahead
of time.

To solve this, the DFA is now built at runtime using `regex-automata`'s
hybrid DFA.

There are however still some checks performed ahead of time, causing
errors with obscenely large regexes (`[0-9A-Za-z]{999999999}`), which
shouldn't cause any issues.

A regex which is large, but not large enough to fail the NFA
construction (like `[0-9A-Za-z]{999999}`) will cause a long search of
the entire grid, but will complete and show the match.

Closes alacritty#7097.

* Underline hint matches during selection

This patch underlines the full regex hint match while the keyboard hint
selection is in process.

While it would be possible to color the entire match, this would only
introduce unnecessary configuration options and be too noisy. The
underline matches the mouse highlighting and has a less drastic visual
impact.

Closes alacritty#6178.

* Bump VTE to 0.12.0

Fixes alacritty#6845.

* Update the escape_support.md for sync updates

Remove the DCS sync updates escape sequence since it's no longer
supported.

Fixes: 47d5007 (Bump VTE to 0.12.0)

* Port from mio to polling

This patch replaces the mio crate with the polling. Now that
smol-rs/polling#96 has been merged, we should be at full feature parity
with mio v0.6 now.

Fixes alacritty#7104.
Fixes alacritty#6486.

* Update dependencies

This patch applies all breaking and non-breaking dependency updates
and bumps MSRV to 1.70.0.

* Fix PTY being closed on creation

The PTY got closed because `OwnedFd` automatically closed it.

Fixes: 59c63d3 (Update dependencies)

* Fix regex matches ending on multiline

This fixes an issue where the reverse search for the regex start would
truncate a character when ending on a newline, since it was omitting the
EOI check in that case.

This also fixes a separate issue which caused regexes which capture
empty strings (e.g.: `.*`) to always report a match.

This is a regression introduced in 73276b6.

* Fix regex patterns allowing for empty strings

This patch changes the mode we search for patterns which allow an empty
string, by anchoring all searches. As a result we will match the longest
possible match when multiple patterns are present (like `;*|rust`),
instead of using the leftmost pattern only.

This is only possible with empty matches since our parser is reset on
every byte anyway, so anchoring the search makes no difference.

Fixes alacritty#7276.

* Use openpty-rustix instead of nix

Follow upstream libraries and use rustix to reduce the amount of
dependencies in the future.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix `window.decorations_theme_variant` reload

The live reload handling wasn't introduced when the option got added.

Fixes alacritty#7295.

* Add inline vi mode search

This patch adds inline search to vi mode using `f`/`F` and `t`/`T` as
default bindings. The behavior matches that of vim.

Fixes alacritty#7203.

* Bump rustix to 0.38.20

* Update winit to 0.29.2 and copypasta to 0.10.0

Fixes alacritty#7236.
Fixes alacritty#7201.
Fixes alacritty#7146.
Fixes alacritty#6848.
Fixes alacritty#3601.
Fixes alacritty#3108.
Fixes alacritty#2453.

* Fix crash due to wrong drop order of clipboard

Fixes alacritty#7309.

* Prefer exact matches for bindings in mouse mode

Only consider bindings without Shift if there are no actions defined for the
actual mouse event.

Closes alacritty#7292.

* Fix typos

* Add version 0.12.3 to CHANGELOG

This is only an update to the development version and does not represent
a stable release.

* Avoid maximizing window when creating new tab

This patch ignores the startup mode when creating a new tab on macOS to
avoid maximizing an existing window.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix clippy warnings

* Add `window.blur` config option

Fixes alacritty#972.

* Add man 5 pages to upload_asset.sh

They are compiled, but not being uploaded.

* Bump glutin to 0.31.1

This fixes a crash on startup with macOS Sonoma.

* Fix crash when leaving search after resize

This fixes a crash which could occur when leaving search with a visible
match after shrinking the terminal height to be lower than the original
line the focused match was in.

Closes alacritty#7054.

* Bump ahash to 0.8.6

* Remove `alacritty_config` from alacritty_terminal

There's no need to force alacritty's user configuration on
other users of the crate, thus provide the options actually used
by alacritty_terminal itself.

* Fix cursor being hidden after reaching timeout

The timeout and blink events could be delivered at the same time,
so canceling blinking won't work and we'll still have an event.

* Use builtin font to draw powerline symbols

In addition to box drawing it was decided to also draw powerline
symbols, since those are quite common and rather simple to draw with
present box drawing infra.

* Unify CLI config override mechanisms

This patch changes the way the `-o` config option works when specified
at startup to function the same way as the IPC mechanism.

While this should technically perform the exact same way, it should
hopefully make it a little easier to understand how CLI config
replacement works.

* Add `--option` argument to `create-window`

This patch adds a new CLI parameter to the `create-window` subcommand,
matching the existing `--option` parameter when creating a new Alacritty
instance.

This parameter allows setting up the initial window configuration from
the CLI without having to call `alacritty msg config`, making sure that
all options are set appropriately right from the start.

Closes alacritty#6238.

* Change default `bell.animation` to `Linear`

The default animation feels really choppy, but it's just how its
function looks.

* Fix visual bell getting stuck on macOS

Fixes alacritty#7325.

* Fix message bar damage

Fixes alacritty#7224.

* Fix Sync capability in terminfo

Alacritty has supported mode 2026 for synchornized updates for a few
months, but the terminfo entry still used the old DCS sequence
originally supported by iTerm2. Since many other terminal emulators and
applications seem to be standardizing around 2026, change the terminfo
entry to use SM instead of DCS.

* Fix Vi cursor not being dirty when scrolling

* Simplify powerline drawing algorithm

Iterate over points in line instead of drawing it right away
and then finding it in the buffer.

Fixes: 4a26667 (Use builtin font to draw powerline symbols)

* Add error handling for OpenGL connection details

* Update VTE to 0.13.0

* Add support for DECRPM/DECRQM

* Damage only terminal inside `alacritty_terminal`

The damage tracking was including selection and vi_cursor which were
rendering viewport related, however all the damage tracking inside
the `alacritty_terminal` was _terminal viewport_ related, meaning that
it should be affected by `display_offset`.

Refactor the damage tracking so `alacritty_terminal` is only tracking
actual terminal updates and properly applying display offset to them,
while `alacritty` pulls this damage into its own UI damage state.

Fixes alacritty#7111.

* Create only one branch per major release

Having a separate branch for each release makes it harder to maintain
without an actual benefit, since every release from the major version
is linear, so creating branches doesn't make any sense.

They also collapse with the tag names leading to ambiguous refs.

* Make sections the same case in man pages

* Fix SelectLastTab in alacritty-bindings(5)

* Make man pages look consistent

Part of the man pages were using _value_, other part were using just
value, thus make everything as _value_.

Also properly dot terminate and add spacing through out the man pages.

* Explicitly use `=` in alacritty(5)

This should help with understanding how to write TOML
without reading too much into specification.

* Improve section to TOML section refs

This should give more hints where to put things.

* Add example for [window] section in alacritty(5)

This should give a hint on how to generally tweak things.

* Drop repo link in *SEE ALSO* man sections

The alacritty documentation is fully present inside the man pages, the
repo provides nothing extra other than a way to report issues, which
lives in its own section anyway.

* Fix default for [[hints.enabled]] in man pages

The default was incomplete, since `command` was missing.

* Add migrate to alacritty(1)

* Damage entire window on font size change

Font size could change without changing the cell dimensions, like
becoming slightly higher/wider.

Fixes: 40160c5 (Damage only terminal inside `alacritty_terminal`)

* Fix IME popup positioning

When setting cursor area, the popup will be placed either above or
below not obscuring the supplied region, however we were still
offsetting line with `+1` putting the cursor at the bottom of the line,
and given that area is from the top-left corner, the wrong area
was marked for not being obscured.

It was also discovered that some compositors, like GNOME, position
IME in the bottom right corner of the supplied region, which is wrong,
but it renders IME popup not very useful, since it's far away from
the place it should be, thus try to not obscure just a few characters
near the cursor.

Given that X11 doesn't support area setting, it uses the old logic
with offsetting.

Co-developed-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: lilydjwg <lilydjwg@gmail.com>

* Bump dependencies

Update dependencies with `cargo update` as well as do explicit update
of winit, crossfont, and regex-automata.

* Make AA stronger for undercurl

This improves undercurl rendering preserving its original thickness.
This also makes it look not out-of place when places next to other
lines.

* Document macOS shortcuts for search

* Adjust default Vi's SearchBackwards binding

We have the same policy with Shift for numbers.

* Fix DECRPM reporting

The DECRQM uses `p` to query, but the reply uses `y`.

Fixes alacritty#7397.

* Optimize undercurl shader

This removes the if and lowers amount of operations.

* Fallback to underline shader when dotted fails

Some hardware is just bad.

Fixes alacritty#7404.

* Don't use `::*` for enum variants in bindings

* Fix chars usage inside the mouse bindings

Fixes alacritty#7413.

* Implement kitty's keyboard protocol

The protocol enables robust key reporting for the applications, so
they could bind more keys and the user won't have collisions with
the normal control keys.

Links: https://sw.kovidgoyal.net/kitty/keyboard-protocol
Fixes alacritty#6378.

* Update to crossfont 0.6.0

* Fix trigger of normal bindings in mouse mode

We should ensure that the `Shift` is actually pressed when trying to
prefer regular bindings instead of the ones if we had Shift applied.

Fixes: 500b696 (Prefer exact matches for bindings in mouse mode)
Fixes alacritty#7415.

* Don't emit text for NamedKey without text repr

When the key doesn't have textual representation we shouldn't emit
the text for them, since they are processed via bindings.

Also, fix the logic to handle named keys with disambiguate without
special modes/modifiers.

Fixes alacritty#7423.

* Fix message bar not damaged when the same size

The regression was added due to `y` coordinate in OpenGL differs to
`y` inside the damage rectangles.

Fixes: 40160c5 (Damage only terminal inside `alacritty_terminal`)

* Bump crossfont to 0.7.0

* Update alacritty versions

This is only an update to the development versions and does not
represent a stable release.

* Add link to rendered config docs

This adds a link to alacritty.org's rendered configuration file
documentation.

* Fix the order of `ClearSelection` in Vi mode

Fixes alacritty#7438.

* Account for option_as_alt when doing kitty protocol

By default `Alt` is not a real `Alt` on macOS, so we shouldn't treat
it as a modifier.

Fixes alacritty#7443.

* Bump winit to 0.29.5

Fixes alacritty#7449.

* Keep IME always enabled on X11

Fixes alacritty#7195.

* Apply modifiers before presses in kitty protocol

While this doesn't handle releases with multiple identical modifiers
pressed, the release can't work reliable anyway, since one modifier
could be pressed before focusing the window, thus tracking modifiers
based on the keysym values won't work as it was suggested by kitty
author.

Links: kovidgoyal/kitty#6913

* Bump winit to 0.29.7

This also bumps other dependencies along the way.

Fixes alacritty#2886.

* Mark SimpleFullscreen as macOS only startup mode

* Derive `Clone` for `EventLoopSender`

* Fix `alacritty migrate` with nonexistent imports

Fixes alacritty#7473.

* Remove direct dependency on once_cell

With MSRV 1.70, std now contains the necessary parts.

* Use pre-composed key for `Alt` bindings on macOS

Fixes alacritty#7475.

* Fix inability to bind `Alt+Control` on Windows

Fixes alacritty#7506.

* Passthrough potential errors for `EventLoopSender`

* Don't substitute `\n` in char bindings

This broke unintentionally due to routing paste-like input
via paste function.

Fixes alacritty#7476.

* Send associated text for shifted numbers with kitty

Also fix the wrong ordering of base and shifted keys.

Fixes alacritty#7492.

* Powerline glyphs being cut for narrow fonts

Fixes alacritty#7470.

* Remove note about versions pre 0.13.0

* Bump winit to 0.29.8

Fixes alacritty#7514.
Fixes alacritty#7502.
Fixes alacritty#7494.
Fixes alacritty#7474.
Fixes alacritty#7472.

* Fix number-based mouse bindings

The toml migration introduced a regression which stopped numbered key
binding's from working. This patch implements the required number type
to make things work again.

Fixes alacritty#7527.

* Fix replacing optional fields

This fixes an issue with the default `SerdeReplace` implementation where
it would never recurse through options but always replace the entire
option with the new value.

Closes alacritty#7518.

* Add vi search paste bindings

Closes alacritty#7511.

* Ignore null values in `alacritty migrate`

This should help with broken YAML configurations by throwing nulls
away, which are not representable in toml.

* Bump winit to 0.29.9

Fixes alacritty#7559.
Fixes alacritty#7533.

* Fix serde tests without default features

Authored-by: James McCoy <jamessan@jamessan.com>

* Fix manpage string escapes

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Add version 0.13.1 to CHANGELOG

This is only an update to the development version and does not represent
a stable release.

* Reduce allocations during keyboard input

* Fixup alacritty_config version and deps

* Fix `debug.renderer="gles2pure"` documentation

Patch 5685ce8 changed the allowed values of the `debug.renderer` enum,
prohibiting the usage of `_` in the `Gles2Pure` variant. This patch
updates the documentation to correct for that.

Co-authored-by: Kirill Chibisov <contact@kchibisov.com>

* Fix inline search expanding across newlines

Closes alacritty#7587.

* Fix env variable overrides through CLI

This fixes an issue where all CLI environment variables would replace
existing configuration file variables instead of merging the two maps
together.

Fixes alacritty#7618.

* Fix typo in config docs

Closes alacritty#7647.

* Allow specifying all config keys on all platforms

Closes alacritty#7592.

* Use builtin font to draw sextants

Sextants are similar to quadrants and should align with them and
other box drawing, thus use builtin font to align them properly.

Part-of: alacritty#7422.

* Fix invalid bounds in selection range conversion

* Don't report associated text only for C0/C1

This has a side effect that we'll have text reported for Alt+Shift+T
and similar, but only C0/C1 should be excluded and Alt+Shift+T is
emitting neither, thus regular `T` will be reported.

Fixes alacritty#7657.

* Move CHANGELOG entry for sextants to proper section

* Don't use kitty sequences outside protocol

Originally kitty defined that functional keys, which are not encoded
by default, like `Pause` should be encoded with `CSI u`. However
the specification was clarified and now it says that terminal
may ignore that part. Given that Alacritty tries to follow xterm/urxvt
when it comes to bindings, CSI u bindings are not send for consistency
reasons.

This also brings back F13-F20 bindings used by Alacritty in 0.12.3, as
well as explicitly defines `NumpadEnter` like it was before.

Closes alacritty#7623.

* Document `command` field in bindings

Closes alacritty#7594.

* Fix unnecessary explicit panic in PTY 

Closes alacritty#7680.

* Fix hang on startup with some Wayland compositors

Fixes alacritty#7665.

* Fix hang on startup with some Wayland compositors

Fixes alacritty#7665.

* Bump alacritty_terminal to 0.22.1

This is only an update to the development version and does not represent
a stable release.

* Add default `Home`/`End` bindings for Vi mode

* Remove extra TIOCSWINSZ ioctl on startup

The openpty call already performs it, thus no need to call it one more
with the exact same size since it confuses some applications.

* Fix row indexing with inclusive ranges

* Use dynamic MSRV for oldstable CI

Instead of manually specifying the oldstable version in all our CI
scripts, it is now pulled from the `Cargo.toml` which simplifies the
update process.

The contributing guide has also been updated to not include the explicit
version and its wording has been loosened a bit to correctly represent
current maintenance practices.

* Bump MSRV to 1.72.0

* Fix clippy warnings

* Fix regional scrolling leaking into history

This fixes an issue where a scrolling region that does not start at the
top of the screen would still rotate lines into history when scrolling
the content "upwards".

* Fix typo in config docs

* Bump winit to 0.29.11

Fixes alacritty#7633.
Fixes alacritty#7613.
Fixes alacritty#7607.
Fixes alacritty#7571.
Fixes alacritty#7549.

* Fix feature = "cargo-clippy" deprecation

* Check alternative cursor icon names on Wayland

* Add alias support to `SerdeReplace`

* Bump winit to 0.29.12

The 0.29.11 was yanked.

* Fix build failure on NetBSD

x11-clipboard was unconditionally using eventfd which is not present
on NetBSD.

Links: quininer/x11-clipboard#48

* Fix log typos

* Bump winit to 0.29.14

Fixes alacritty#7806.

* Expose more process info on Windows

* Send exit code events on child process exit

Fixes alacritty#7753.

* Set PTY's pixel size on startup

117719b removed the extra call for TIOCSWINSZ, however the initial
`openpty` call itself did not set the pixel size, which caused issues
with some clients.

* Fix hint `Select` action for hyperlink escape

This fixes an issue where the `Select` action for hyperlink escape text
would select the entire line, instead of selecting only the hyperlink
itself.

It also changes the way hyperlinks with the same ID are highlighted,
removing the restriction of being on consecutive lines and instead
highlighting all visible cells that correspond to the matching
hyperlink.

Closes alacritty#7766.

* Bump winit to 0.29.15

* Bump dependencies

This bumps all dependencies that can be updated without introducing a
build failure.

* Drop MSRV to 1.70.0

* Allow setting terminal env vars via PTY options

Closes alacritty#7778.

* Fix kitty encoding used for char input without text

On Windows some key combinations for regular text input, like Ctrl+1
don't have any text attached, so they were generating the kitty escape
sequence even when they shouldn't.

* Fix msi installer build

This works around an issue where wix was pulling pre-release extensions
and thus breaking compatibility with our used wix version.

* Send ESC with Alt for unicode input

Make `Alt` send `ESC` for unicode input the way it's done for ASCII.
Previously it was disabled because of macOS, however on macOS we're
using the `option_as_alt` setting, which solves the original issue.

The `Alt` prefixing is still disabled for the unicode strings, like
when they come from the compose input.

Fixes alacritty#7852.

* Add version 0.13.2 to CHANGELOG

This is only an update to the development version and does not represent
a stable release.

* Fix "Open Alacritty Here" on Windows

* Update homepage and repository in Cargo manifests

* Fix window being focused by default

Winit explicitly states that the window is not focused by default and
the `Focused` event will deliver the state later on.

Also start adding notable changes to alacritty_terminal in its own
CHANGELOG.

Closes alacritty#7866.

* Fix crash when trying to open a new tab on macOS

This fixes an issue where Alacritty would crash when trying to open a
new tab on macOS while having decorations disabled.

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix missing config import warning

* Fix IME preview overlapping text

Fix incorrect usage of the `flags` when drawing the preedit resulting
in setting the `flags`, but not actually reading the value back.

The logic to skip things was also used incorrectly, because the renderer
does that already based on the `WIDE_CHAR` flag on the cell.

Fixes: 67a433c (Skip whitespaces for wide chars in preedit)

* Fix dynamic title override for multiple windows

This fixes an issue where Windows spawned after the initial one through
IPC or bindings would not update their title due to the initial window
having its title set through the CLI.

Title changes are still inhibited for additional windows when they are
spawned through `alacritty msg create-window` with the `--title` CLI
option added.

Closes alacritty#6836.

* Add `from_file_descriptors()` to `tty::unix`

* Add config file locations into alacritty(5)

* Bump alacritty_terminal to 0.24.1-dev

This is only an update to the development version and does not represent
a stable release.

* Fix shutdown of config monitor

This implements a coordinated shutdown of the config monitor by sending
an event to its thread and waiting for the thread to terminate.

* Bump winit to 0.30.0

* Fix user events for all windows not handled

The user events for all cases were not handled.

Fixes: 48c088a (Bump winit to 0.30.0)
Fixes: alacritty#7957.

* Allow requesting Bluetooth permission on macOS

* Add missing comma to alacritty(5) manpage

* Ignore shell RCs for macOS zsh wrapper

Closes alacritty#7886.

* Fix mouse mode bindings with multiple actions

The following config was broken:
```
[mouse]
bindings = [
    { mouse = "Right", mods = "Shift", action = "Copy"            },
    { mouse = "Right", mods = "Shift", action = "ClearSelection"  },
]
```

Only the first action was applied. Change to allow more than one exact
match in mouse mode with shift held, but keep the logic to not allow
fallback search if any exact match was found.

Regression was introduced in 1a143d1.

* Fix FD leak after closing child windows

This patch fixes an issue with signal handling where Alacritty would
permanently create one signal handling FD for each alacritty window
created by an instance. This FD was never released, causing a leak of
the FD.

Closes alacritty#7983.

* Fix IO safety violation from consequent dropping `OwnedFd`

This was not a _real_ violation and was _expected_, though for rust
to not complain clone FD properly...

* Fix error with missing imports

This fixes a regression, likely introduced in 5d173f6, which changed
the severity of missing imports from `info` back to `error`.

The cause of this issue was a more complicated error handling mechanism,
which explicitly translated IO errors to a separate enum variant without
accounting for it in all scenarios.

While retrospectively this seems completely unnecessary to me, it did
mean shorter error messages in case the main config file was not found.
To preserve the benefits of both approaches, explicit handling for the
`NotFound` IO error has been added when loading the main configuration
file.

* Fix Kitty protocol reporting shifted keycodes

The [kitty keyboard protocol][1] explicitly requires that the
*un-shifted* version of the pressed key is used to report the primary
code point in `CSI code-point;modifiers u` sequences.

> Note that the codepoint used is always the lower-case (or more
> technically, un-shifted) version of the key. If the user presses, for
> example, ctrl+shift+a the escape code would be CSI 97;modifiers u. It
> must not be CSI 65; modifiers u.

Alacritty's current behavior is to report the shifted version when shift
is pressed, and the un-shifted version otherwise:

```console
 # Note that you'll have to kill Alacritty after running this to get
 # control back!
$ echo -ne '\x1b[>1u'; cat
^[[97;5u^[[65;6u
```

The above was generated by pressing `CTRL`+`a` followed by
`CTRL`+`SHIFT`+`a` after running the command. Here `97` and `65` are the
codepoints for `a` and `A` respectively.

This change makes Alacritty match the protocol (and Kitty's) behavior.
With this change applied, `97` is reported for both `CTRL`+`a` and
`CTRL`+`SHIFT`+`a`.

[1]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#key-codes

* Fix spelling errors

* Bump glutin to 0.32.0

* Bump winit to 0.30.2

Fixes alacritty#7969.

* Bump winit to 0.30.3

Fixes alacritty#8046.

* Use latest macOS image on CI (alacritty#8072)

Old macOS images are deprecated resulting in often failures, thus use 
latest macOS images available.

Also given that macOS is arm64 by default check x86_64 as extra job
and not arm64.

* Support relative imports in config file

Co-authored-by: Christian Duerr <contact@christianduerr.com>

* Fix search bug with wrapline on first character

This fixes an issue where an inline search in the left direction would
incorrectly assume that the first cell searched would not contain the
`WRAPLINE` flag, causing the second search for the match end to
terminate prematurely.

Fixes alacritty#8060.

* Bump MSRV to 1.74.0

* Bump dependencies

Update winit and clap to latest versions.

* Document options which are not working everywhere yet

This includes `window.position` and `window.resize_increments`.

* Restart config monitor on import change

This patch checks the hash of the import paths on every config change
and restarts the config monitor whenever the current monitor's hash
diverges from the updated config's list of imports.

Closes alacritty#7981.

* Unify string formatting

* Fix description in alacritty-bindings(5)

Man pages use the man page name as the first word in description. This
also aligns with other man pages we have.

* Make `ConPty` creation fallible

* Remove duplicate clip-path from logo

* Update checkout CI action

* Improve TermMode bitflags initialization

* Make alacritty(1) config paths resemble alacritty(5)

This also fixes the escaping in alacritty(5) page.

* Ignore cursor color request with default colors

Currently when the cursor colors are requested for the default cursor
color, Alacritty always responds with #000000. Since this is most likely
incorrect, this response is misleading.

Realistically there's very little reason why any application would need
to know the color of the (often dynamically changing) default cursor. So
instead of always reporting an incorrect black value, this patch just
stops reporting values unless the cursor color was explicitly changed.

Closes alacritty#8169.

* Fix fullwidth semantic escape characters

Semantic escape characters occupying two two grid cells were always
skipped over, making it impossible to have functional fullwidth
characters as part of semantic escape characters.

This patch fixes this by only skipping over fullwidth spacer cells,
rather than skipping those cells entirely.

Closes alacritty#8188.

* Fix app icon in alt+tab view on Windows

* Move root config fields to `[general]` section

Some users struggle with TOML, since root options must always be at the
top of the file, since they're otherwise associated with the last table.

To avoid misunderstandings, all root-level fields have been removed. A
new `general` section was added to allow housing configuration options
that do not fit into any more specific groups.

Closes alacritty#7906.

* Add migration support for TOML config changes

This patch allows running `alacritty migrate` to automatically apply
configuration changes made to the TOML format, like moving `ipc_socket`
to `general.ipc_socket`.

This should reduce the friction of moving around individual options
significantly, while also persisting the format of the existing TOML
file thanks to `toml_edit`.

The YAML migration has been simplified significantly to only switch the
format of the file from YAML to TOML. The new TOML features are used for
everything else.

* Restructure message bar log message

The first line is not really useful for the user, so move it to the
bottom.

* Remove startup notify variables only for shell

This will prevent issues when `setup_env` from `alacritty_terminal` will
remove potentially useful variables for users of the library.

Fixes alacritty#8202.

* Remove unused `Clone` requirements

* Fix highlight invalidation on grid scroll

This fixes an issue where hints highlighted by vi or mouse cursor would
produce an underline on the incorrect line since the highlights only
store the initial match boundaries without accounting for new content
scrolling the terminal.

To accurately invalidate the hint highlights, we use existing damage
information of the current frame. The existing logic to damage hints for
the next frame to account for removal has been changed, since the hints
would otherwise be cleared immediately. Instead we now mark the terminal
as fully damaged for the upcoming frame whenever the hints are cleared.

Closes alacritty#7737.

* Change ctrl+shift+u to ctrl+shift+o

Avoid collisions with IMEs by using ctrl+shift+o. ctrl+shift+u is bound
to open unicode input in a lot of IMEs by default meaning that users
won't ever see the url hints UI.

* Add unicode 16 support

This fixes issues in width calculation for symbols added in Unicode
version 16.

Since the upstream unicode-width crate has not been updated yet, this
makes use of the temporary unicode-width-16 version to support Unicode
16 with Alacritty 0.14.0.

* Fix panic on missing general config section

Fixes alacritty#8230.

* Alacritty version 0.14.0-rc1

* Implement multi-char cursor highlight

Use `end` of the cursor to draw a `HollowBlock` from `start` to `end`.
When cursor covers only a single character, use `Beam` cursor instead
of `HollowBlock`.

Fixes alacritty#8238.
Fixes alacritty#7849.

* Add IME support to inline search

This changes the behavior of inline search from only accepting direct
key inputs, to also accepting IME and paste. The additional characters
are still being discarded, matching the existing behavior.

This also fixes an issue where inline search wouldn't work for
characters requiring modifiers, since the modifier press was interpreted
as the search target instead.

Closes alacritty#8208.

* Add headless mode

This patch adds a daemon mode to Alacritty which allows starting the
Alacritty process without spawning an initial window.

While this does not provide any significant advantage over the existing
behavior of always spawning a window, it does integrate nicer with some
setups and is a pretty trivial addition.

* Remove dbg! in migration command

* Alacritty version 0.14.0-rc2

* Fix pipe FD leak on X11

The pipe was not using O_CLOEXEC, so it was leaked into the child.

Fixes alacritty#8249.

* Revert "Add unicode 16 support"

This reverts commit 5dca7a8.

* Do not pull serde without serde feature

alacritty_terminal was pulling `serde` via vte even though
serde feature was disabled.

* Alacritty version 0.14.0

* Apply patch

* Patch

---------

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Co-authored-by: Pavel Roskin <1317472+proski@users.noreply.github.com>
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
Co-authored-by: Christian Duerr <contact@christianduerr.com>
Co-authored-by: Sonu Bardai <67749330+SonuBardai@users.noreply.github.com>
Co-authored-by: Yug Shende <yugshende@gwu.edu>
Co-authored-by: Nick Reilingh <nreiling@bard.edu>
Co-authored-by: Andrea Frigido <frisoft@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: tv <tv@krebsco.de>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Arhum Jain <75106472+ArhumJain@users.noreply.github.com>
Co-authored-by: Rolf Sievert <26115145+RolfSievert@users.noreply.github.com>
Co-authored-by: Simone Ragusa <simoneragusa@duck.com>
Co-authored-by: John Nunley <jtnunley01@gmail.com>
Co-authored-by: Kyle Willmon <kylewillmon@gmail.com>
Co-authored-by: Julian Braha <julianbraha@gmail.com>
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Cédric Van Rompay <cedric.vanrompay@gmail.com>
Co-authored-by: Hyper <HyperHamster@users.noreply.github.com>
Co-authored-by: Philip Dubé <serprex@users.noreply.github.com>
Co-authored-by: Lars Francke <lars.francke@stackable.tech>
Co-authored-by: Omar Magdy <99906646+omagdy7@users.noreply.github.com>
Co-authored-by: WuerfelDev <WuerfelDev@users.noreply.github.com>
Co-authored-by: Popa Ioan Alexandru <49609151+ALEX11BR@users.noreply.github.com>
Co-authored-by: Mohammad AlSaleh <CE.Mohammad.Alsaleh@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Alexandru Placinta <placintaalexandru1@gmail.com>
Co-authored-by: Yadi Abdalhalim <36752216+Ydot19@users.noreply.github.com>
Co-authored-by: Dimitris Apostolou <dimitris.apostolou@icloud.com>
Co-authored-by: Friz64 <friz64@protonmail.com>
Co-authored-by: huajin tong <137764712+thirdkeyword@users.noreply.github.com>
Co-authored-by: Small White <364772080@qq.com>
Co-authored-by: ZhiZe-ZG <75554862+ZhiZe-ZG@users.noreply.github.com>
Co-authored-by: Foorack / Max Faxälv <max@foorack.com>
Co-authored-by: William Viktorsson <williamviktorsson@gmail.com>
Co-authored-by: Matt Fellenz <matt@felle.nz>
Co-authored-by: Owen Law <81528246+someone13574@users.noreply.github.com>
Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Giacomo Battaglia <66565007+g-battaglia@users.noreply.github.com>
Co-authored-by: Travis Finkenauer <tmfink@users.noreply.github.com>
Co-authored-by: Nathan Lilienthal <nathan@nixpulvis.com>
Co-authored-by: EBADBEEF <errno@ebadf.com>
Co-authored-by: Jakob Hellermann <jakob.hellermann@protonmail.com>
Co-authored-by: jadedpasta <86900272+jadedpasta@users.noreply.github.com>
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Joshua Cao <cao.joshua@yahoo.com>
Co-authored-by: Hamir Mahal <hamirmahal@gmail.com>
Co-authored-by: philomathic_life <15947783+zacknewman@users.noreply.github.com>
Co-authored-by: Dimitri Sabadie <dimitri.sabadie@gmail.com>
Co-authored-by: Neil Stewart <40719351+madcdevelop@users.noreply.github.com>
Co-authored-by: YizhePKU <yizhe@pku.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants