Skip to content

Conversation

Copy link

Copilot AI commented Feb 2, 2026

Overview

Implements ergonomic keybinding configurations for Ghostty terminal and Neovim optimized for ZSA Moonlander, using hand-separation philosophy: modifiers on one hand, action keys on the other.

Configuration Structure

Ghostty (.config/ghostty/config)

# Shell/Font/Theme/Window/Platform-specific settings organized in sections
window-show-tab-bar = always
gtk-tabs-location = bottom
macos-titlebar-style = tabs

# Hand-separated keybindings
keybind = alt+e=goto_split:top              # Left hand nav
keybind = ctrl+shift+i=new_split:up         # Right hand creation
keybind = shift+arrow_left=previous_tab     # Standard terminal pattern

Neovim (.config/nvim/lua/config/ghostty-compat.lua)

-- One modifier tier above Ghostty to prevent conflicts
vim.keymap.set("n", "<M-S-e>", "<C-w>k")    -- Alt+Shift vs Alt
vim.keymap.set("n", "<M-S-i>", "<cmd>resize +2<cr>")

Key Design Decisions

Preserved standard sequences:

  • Bare Ctrl+R for shell reverse-i-search (unbound in Ghostty)
  • Ctrl+F/G reserved for find/find-next
  • PageUp/PageDown bound to ignore to prevent escape sequence artifacts (were generating tilde characters)

Navigation patterns:

  • Shift+Left/Right for tabs (iTerm2/Konsole convention)
  • Alt+ESDF for split navigation (left hand)
  • Ctrl+Shift+IJKL for split creation (right hand)

Syntax corrections:

  • move_tab:left/rightmove_tab:-1/1 (numeric offset required)
  • grave_accentbackquote (per Ghostty's key.zig)

Documentation

Comprehensive README with visual ASCII guides, keybinding reference tables, and rationale for preserved/ignored keys.

Original prompt

Add Ghostty and Neovim Keybinding Configurations

Create comprehensive keybinding configurations for Ghostty terminal emulator and Neovim that follow a consistent hand-separation design philosophy.

Design Principles

  1. Hand separation: Modifier on one hand, action keys on the other
  2. Left hand keys (ESDF, W, R, numbers) = NAVIGATION
  3. Right hand keys (IJKL, T) = CREATION / ADJUSTMENT
  4. Modifier combinations (ranked by comfort):
    • Alt or Alt+Shift (right thumb) + ESDF (left hand)
    • Ctrl or Ctrl+Shift (left thumb) + IJKL (right hand)
  5. Preserve terminal sequences: Ctrl+C (SIGINT), Ctrl+Z (SIGTSTP), Ctrl+V (literal/visual block), Ctrl+D (EOF)
  6. Ghostty and Neovim coexist: Different modifier tiers for each

Keyboard Context

ZSA Moonlander keyboard with:

  • Left thumb: Ctrl, Del, Space
  • Right thumb: Alt, Enter, Space
  • Alt+number keys produce F1-F10 (Layer 2), so Alt+n not available for tab switching

Key Assignments

Ghostty Splits

Operation Keys Description
Navigate Alt+ESDF E=up, S=left, D=down, F=right
Navigate prev/next Alt+W / Alt+R Cycle through splits
Create Ctrl+Shift+IJKL I=up, J=left, K=down, L=right
Create auto Ctrl+Shift+Enter Auto-pick direction
Resize Ctrl+IJKL Same layout as create
Equalize Ctrl+Shift+= Make all splits equal
Zoom Ctrl+Shift+\ Toggle maximize current split
Move/Swap (future) Ctrl+Alt+ESDF Reserved for future Ghostty feature

Ghostty Tabs

Operation Keys Description
Navigate prev/next Ctrl+W / Ctrl+R W=previous, R=next
Go to tab N Ctrl+Shift+1-9 Direct tab access
Move tab Alt+Shift+A / Alt+Shift+G A=left, G=right
Create Ctrl+Shift+T New tab
Close surface Ctrl+Shift+W With confirmation
Close window Ctrl+Shift+Q With confirmation

Neovim Windows (within Ghostty splits)

Operation Keys Description
Navigate Alt+Shift+ESDF +Shift from Ghostty
Navigate prev/next Alt+Shift+W / Alt+Shift+R Cycle windows
Create Ctrl+W, then IJKL Standard Vim prefix + IJKL
Resize Alt+Shift+IJKL Right hand, +Shift variant
Move/Swap Ctrl+Alt+Shift+ESDF +Shift from Ghostty
Rotate Ctrl+W, r/R Standard Vim

Other Bindings

Operation Keys
Copy Ctrl+Shift+C
Paste Ctrl+Shift+V
Paste selection Ctrl+Shift+Insert
Search Ctrl+Shift+/
Scroll page Shift+PageUp/PageDown
Scroll line Shift+Up/Down
Scroll top/bottom Shift+Home/End
Jump prompt Ctrl+Shift+Up/Down
Font size +/- Ctrl+Equal / Ctrl+Minus
Font size reset Ctrl+0
New window Ctrl+Shift+N
Fullscreen F11
Quick terminal Ctrl+` (global)
Command palette Ctrl+Shift+P
Open config Ctrl+Shift+,
Tab overview Ctrl+Shift+A
Reverse search Ctrl+Shift+R (sends ^R to terminal)

Files to Create

1. Ghostty Configuration

Create .config/ghostty/config with:

# =============================================================================
# Ghostty Keybindings
# =============================================================================
#
# Design Principles:
#   1. Hand separation: Modifier on one hand, action keys on the other
#   2. LEFT HAND KEYS (ESDF, W, R, numbers) = NAVIGATION
#   3. RIGHT HAND KEYS (IJKL, T, O, P) = CREATION / ADJUSTMENT
#   4. Modifier combos (comfort ranked):
#      - Alt or Alt+Shift (right thumb) + ESDF (left hand)
#      - Ctrl or Ctrl+Shift (left thumb) + IJKL (right hand)
#
# Keyboard: ZSA Moonlander
#   Left thumb: Ctrl, Del, Space
#   Right thumb: Alt, Enter, Space
#
# Split/Tab Philosophy:
#   - Alt+ESDF = Ghostty split navigation
#   - Alt+Shift+ESDF = Neovim window navigation (reserved, passes through)
#   - Ctrl+Shift+IJKL = Split creation
#   - Ctrl+IJKL = Split resize
#   - Ctrl+W/R = Tab navigation (left hand)
#   - Ctrl+Shift+T = Tab creation (right hand)
#

# =============================================================================
# COPY / PASTE
# =============================================================================
keybind = ctrl+shift+c=copy_to_clipboard
keybind = ctrl+shift+v=paste_from_clipboard
keybind = ctrl+shift+insert=paste_from_selection

# =============================================================================
# SPLIT NAVIGATION (Left hand - Alt + ESDF)
# =============================================================================
# Alt (right thumb) + ESDF (left hand)
# E=up, S=left, D=down, F=right

keybind = alt+e=goto_split:up
keybind = alt+d=goto_split:down
keybind = alt+s=goto_split:left
keybind = alt+f=goto_split:right

# Cycle through splits
keybind = alt+w=goto_split:previous
keybind = alt+r=goto_split:next

# =============================================================================
# SPLIT CREATION (Right ...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for you](https://github.com/lamawithonel/dotfiles/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add keybinding configurations for Ghostty and Neovim Add Ghostty and Neovim keybindings with hand-separation design Feb 2, 2026
Copilot AI requested a review from lamawithonel February 2, 2026 04:02
Copilot AI and others added 2 commits February 2, 2026 00:08
… design

Co-authored-by: lamawithonel <532659+lamawithonel@users.noreply.github.com>
@lamawithonel lamawithonel force-pushed the copilot/add-ghostty-neovim-keybindings branch from c225995 to 7e7102d Compare February 2, 2026 05:08
Co-authored-by: lamawithonel <532659+lamawithonel@users.noreply.github.com>
Copilot AI changed the title Add Ghostty and Neovim keybindings with hand-separation design Fix invalid Ghostty keybind syntax for slash and grave keys Feb 2, 2026
Co-authored-by: lamawithonel <532659+lamawithonel@users.noreply.github.com>
Copilot AI changed the title Fix invalid Ghostty keybind syntax for slash and grave keys Fix Ghostty keybind syntax errors: move_tab actions and backquote key name Feb 2, 2026
…+F/G

Co-authored-by: lamawithonel <532659+lamawithonel@users.noreply.github.com>
Copilot AI changed the title Fix Ghostty keybind syntax errors: move_tab actions and backquote key name Preserve standard terminal keybindings: Ctrl+R, Ctrl+F, Ctrl+G Feb 2, 2026
Co-authored-by: lamawithonel <532659+lamawithonel@users.noreply.github.com>
Copilot AI changed the title Preserve standard terminal keybindings: Ctrl+R, Ctrl+F, Ctrl+G Add Ghostty and Neovim keybinding configurations with hand-separation design Feb 2, 2026
…acter key handling

Co-authored-by: lamawithonel <532659+lamawithonel@users.noreply.github.com>
Copilot AI changed the title Add Ghostty and Neovim keybinding configurations with hand-separation design Fix PageUp/PageDown generating tilde characters via escape sequences Feb 2, 2026
Co-authored-by: lamawithonel <532659+lamawithonel@users.noreply.github.com>
Copilot AI changed the title Fix PageUp/PageDown generating tilde characters via escape sequences Comprehensive Ghostty and Neovim keybindings with hand-separation design Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants