<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jason Araya Solano</title>
    <description>The latest articles on DEV Community by Jason Araya Solano (@jsonarso).</description>
    <link>https://dev.to/jsonarso</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F980995%2Fe866a2ed-2962-4016-b185-30cb31d12240.jpeg</url>
      <title>DEV Community: Jason Araya Solano</title>
      <link>https://dev.to/jsonarso</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jsonarso"/>
    <language>en</language>
    <item>
      <title>Your Ghostty Keybindings Are Broken (Here's the 60-Second Fix)</title>
      <dc:creator>Jason Araya Solano</dc:creator>
      <pubDate>Tue, 03 Feb 2026 16:44:54 +0000</pubDate>
      <link>https://dev.to/jsonarso/your-ghostty-keybindings-are-broken-heres-the-60-second-fix-4kio</link>
      <guid>https://dev.to/jsonarso/your-ghostty-keybindings-are-broken-heres-the-60-second-fix-4kio</guid>
      <description>&lt;p&gt;You know that thing where you press &lt;strong&gt;⌘←&lt;/strong&gt; to jump to the start of a line and Ghostty just... prints &lt;code&gt;^A&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;Yeah. Let's fix that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;macOS has beautiful text navigation shortcuts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⌥←&lt;/strong&gt; / &lt;strong&gt;⌥→&lt;/strong&gt; → Jump by word&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⌘←&lt;/strong&gt; / &lt;strong&gt;⌘→&lt;/strong&gt; → Jump to start/end of line&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⌘⌫&lt;/strong&gt; → Delete everything before cursor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These work everywhere—Notes, VS Code, your browser—except Ghostty. Instead, you get garbage like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv .venv &amp;amp;&amp;amp; source .venv/activate^E^A^E^A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not great.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Fix
&lt;/h2&gt;

&lt;p&gt;Two things need to happen:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Tell Ghostty to treat Option as Alt
&lt;/h3&gt;

&lt;p&gt;Create or edit your Ghostty config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.config/ghostty
nano ~/.config/ghostty/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;macos-option-as-alt = true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and &lt;strong&gt;restart Ghostty&lt;/strong&gt; (it doesn't hot-reload config changes).&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Put zsh in emacs mode
&lt;/h3&gt;

&lt;p&gt;This is the part that got me. Even with the right Ghostty config, my shell wasn't interpreting the escape codes.&lt;/p&gt;

&lt;p&gt;Run this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bindkey &lt;span class="nt"&gt;-e&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it works, make it permanent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"bindkey -e"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. You're done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Happens
&lt;/h2&gt;

&lt;p&gt;Those &lt;code&gt;^A&lt;/code&gt; and &lt;code&gt;^E&lt;/code&gt; characters are actually the correct escape codes for "beginning of line" and "end of line"—your shell just wasn't listening.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Shortcut&lt;/th&gt;
&lt;th&gt;What it sends&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;⌘←&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Ctrl+A&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Beginning of line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⌘→&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Ctrl+E&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;End of line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⌥←&lt;/td&gt;
&lt;td&gt;&lt;code&gt;\x1bb&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Back one word&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⌥→&lt;/td&gt;
&lt;td&gt;&lt;code&gt;\x1bf&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Forward one word&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;bindkey -e&lt;/code&gt; command puts zsh into emacs mode, which is what makes it understand these codes. Some shell configs (especially if you're using oh-my-zsh or other frameworks) might override this, which is why it's worth adding explicitly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coming from Warp?
&lt;/h2&gt;

&lt;p&gt;If you switched from Warp to Ghostty, this is probably the first thing that felt broken. Warp handles this natively because it's built differently. Ghostty is a traditional terminal emulator, so it needs a little help.&lt;/p&gt;

&lt;p&gt;Now you've got the best of both worlds—Ghostty's speed and simplicity with the keybindings your fingers expect.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tested on Ghostty + zsh on macOS.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
