<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ghostty.git/src/input/KeyEncoder.zig, branch v1.2.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/'/>
<entry>
<title>style: use decl literals</title>
<updated>2025-05-27T03:50:14+00:00</updated>
<author>
<name>Qwerasd</name>
<email>qwerasd205@users.noreply.github.com</email>
</author>
<published>2025-05-27T03:39:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=2384bd69cc25db7228dcb2e90ea1d296bbf0ba84'/>
<id>2384bd69cc25db7228dcb2e90ea1d296bbf0ba84</id>
<content type='text'>
This commit changes a LOT of areas of the code to use decl literals
instead of redundantly referring to the type.

These changes were mostly driven by some regex searches and then manual
adjustment on a case-by-case basis.

I almost certainly missed quite a few places where decl literals could
be used, but this is a good first step in converting things, and other
instances can be addressed when they're discovered.

I tested GLFW+Metal and building the framework on macOS and tested a GTK
build on Linux, so I'm 99% sure I didn't introduce any syntax errors or
other problems with this. (fingers crossed)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit changes a LOT of areas of the code to use decl literals
instead of redundantly referring to the type.

These changes were mostly driven by some regex searches and then manual
adjustment on a case-by-case basis.

I almost certainly missed quite a few places where decl literals could
be used, but this is a good first step in converting things, and other
instances can be addressed when they're discovered.

I tested GLFW+Metal and building the framework on macOS and tested a GTK
build on Linux, so I'm 99% sure I didn't introduce any syntax errors or
other problems with this. (fingers crossed)
</pre>
</div>
</content>
</entry>
<entry>
<title>macos: do not send UTF-8 PUA codepoints to key events</title>
<updated>2025-05-12T18:42:05+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-05-12T18:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=ecda5ec327288bae5e27c8d2ec1e7ac3a99b3087'/>
<id>ecda5ec327288bae5e27c8d2ec1e7ac3a99b3087</id>
<content type='text'>
Fixes #7337

AppKit encodes functional keys as PUA codepoints. We don't want to send
that down as valid text encoding for a key event because KKP uses that
in particular to change the encoding with associated text.

I think there may be a more specific solution to this by only doing this
within the KKP encoding part of KeyEncoder but that was filled with edge
cases and I didn't want to risk breaking anything else.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #7337

AppKit encodes functional keys as PUA codepoints. We don't want to send
that down as valid text encoding for a key event because KKP uses that
in particular to change the encoding with associated text.

I think there may be a more specific solution to this by only doing this
within the KKP encoding part of KeyEncoder but that was filled with edge
cases and I didn't want to risk breaking anything else.
</pre>
</div>
</content>
</entry>
<entry>
<title>input: ignore control characters for backspace/enter/escape special case</title>
<updated>2025-05-09T18:05:42+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-05-09T17:58:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=ebabdb322c911f190e547473b681b3daccbb7373'/>
<id>ebabdb322c911f190e547473b681b3daccbb7373</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>input: control-encode right control properly</title>
<updated>2025-05-09T17:16:21+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-05-09T17:16:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=293a67cd01a1fdb8a131c4591c078f49aa6dd3d3'/>
<id>293a67cd01a1fdb8a131c4591c078f49aa6dd3d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>input: remove `physical_key` from the key event (all keys are physical)</title>
<updated>2025-05-09T17:01:06+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-05-09T03:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=5962696c3b0f42f863b91f6995d2d41e35dcc550'/>
<id>5962696c3b0f42f863b91f6995d2d41e35dcc550</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>input: remove translated</title>
<updated>2025-05-09T17:01:05+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-05-08T15:47:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=a3462dd2bd541af6372855917c6ccb5643aeda93'/>
<id>a3462dd2bd541af6372855917c6ccb5643aeda93</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>macOS: Do not send control characters as UTF8 keyboard text</title>
<updated>2025-04-19T13:54:36+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-04-19T13:43:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=31b2ac4b7933a1002473a870c3708ae6501f1279'/>
<id>31b2ac4b7933a1002473a870c3708ae6501f1279</id>
<content type='text'>
Fixes a regression where `ctrl+enter` was not encoding properly since
our input stack changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes a regression where `ctrl+enter` was not encoding properly since
our input stack changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Kitty key encoding should not encode backspace if UTF-8 text is present</title>
<updated>2025-03-19T19:43:42+00:00</updated>
<author>
<name>Serim Son</name>
<email>serim711@gmail.com</email>
</author>
<published>2025-02-13T04:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=d61e53d6d66fce40c8ec501b7da46221016b5d47'/>
<id>d61e53d6d66fce40c8ec501b7da46221016b5d47</id>
<content type='text'>
This applies the same logic from #1659 to Kitty encoding.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This applies the same logic from #1659 to Kitty encoding.
</pre>
</div>
</content>
</entry>
<entry>
<title>Lots of 0.14 changes</title>
<updated>2025-03-12T16:55:52+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-03-12T16:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=0f4d2bb2375c707182dba8cf2dd7723a2e918e79'/>
<id>0f4d2bb2375c707182dba8cf2dd7723a2e918e79</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>input: legacy encoding never encodes text for command mods on macOS</title>
<updated>2025-03-02T21:53:20+00:00</updated>
<author>
<name>Mitchell Hashimoto</name>
<email>m@mitchellh.com</email>
</author>
<published>2025-03-02T21:49:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=f93eb0b27fa68c091d03ae6a8bf4021600caf7b2'/>
<id>f93eb0b27fa68c091d03ae6a8bf4021600caf7b2</id>
<content type='text'>
Fixes #5929
Replaces #5984

On macOS, native applications typically never encode any text for
key events that use the command key. This is because the command key
is used for key equivalents and "commands" and should not be used
for text input.

This can be verified with apps like TextEdit but also terminals like
Terminal.app officially but also iTerm2 unofficially. Anything such as
`Cmd+b` or `Cmd+Shift+b` will not produce any text input.

Cross-platform terminals generally don't follow this, for example Kitty
performs CSI-u encoding and Alacritty and WezTerm encode the text as-is
(i.e. `Cmd+b` will produce `b`).

On Linux, the super key (command-equivalent) does produce text input.
For example, `Super+b` will produce `b` in Gnome Console, Foot, and
all the cross-platform terminals mentioned above.

In the interest of matching the behavior of native macOS applications,
we should not encode text for command key events on macOS. We continue
to encode text for the super key on non-macOS platforms.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #5929
Replaces #5984

On macOS, native applications typically never encode any text for
key events that use the command key. This is because the command key
is used for key equivalents and "commands" and should not be used
for text input.

This can be verified with apps like TextEdit but also terminals like
Terminal.app officially but also iTerm2 unofficially. Anything such as
`Cmd+b` or `Cmd+Shift+b` will not produce any text input.

Cross-platform terminals generally don't follow this, for example Kitty
performs CSI-u encoding and Alacritty and WezTerm encode the text as-is
(i.e. `Cmd+b` will produce `b`).

On Linux, the super key (command-equivalent) does produce text input.
For example, `Super+b` will produce `b` in Gnome Console, Foot, and
all the cross-platform terminals mentioned above.

In the interest of matching the behavior of native macOS applications,
we should not encode text for command key events on macOS. We continue
to encode text for the super key on non-macOS platforms.
</pre>
</div>
</content>
</entry>
</feed>
