Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
name: "Home Row Arrows",
tagline: "Hold F for arrow keys — your fingers never leave the home row",
shortDescription:
"Hold F and your right hand becomes arrow keys. Tap F normally to type. I/J/K/L for arrows in an inverted-T layout you already know from your arrow keys.\n\nH and ; give you Home and End for jumping to the start or end of a line. U and O are Page Up and Page Down.",

Check warning on line 89 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Line should be 200 characters or less; currently it has 274 characters (line_length)
longDescription: "",
category: "Navigation",
iconSymbol: "arrow.up.and.down.and.arrow.left.and.right",
Expand All @@ -94,7 +94,7 @@
quickSettings: [],
bindings: [
PackBindingTemplate(input: "f", output: "f", holdOutput: "layer:home-arrows",
title: "F · tap / Arrows · hold"),

Check warning on line 97 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Collection literals should not have trailing commas (trailing_comma)
],
associatedCollectionID: RuleCollectionIdentifier.homeRowArrows,
suggestedForKeys: ["f", "i", "j", "k", "l"],
Expand All @@ -113,7 +113,7 @@
packID: "com.keypath.pack.key-repeat-control",
kind: .enhancedBy,
description: "Fast Navigation makes your Home Row Arrows repeat 3× faster for quick cursor movement"
),

Check warning on line 116 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Collection literals should not have trailing commas (trailing_comma)
]
)

Expand Down Expand Up @@ -237,7 +237,7 @@
packID: "com.keypath.pack.vim-navigation",
kind: .enhancedBy,
description: "Adds Leader key layer activation when Vim Navigation is enabled"
),

Check warning on line 240 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Collection literals should not have trailing commas (trailing_comma)
]
)

Expand Down Expand Up @@ -644,7 +644,7 @@
name: "Fast Navigation",
tagline: "Arrow keys and delete at 3x speed",
shortDescription:
"Your arrow keys move through text at the same sluggish speed as every other key. Fast Navigation makes them 3× faster — jump through code, scroll spreadsheets, edit text at the speed your brain actually works.\n\nDelete gets faster too. Regular typing stays steady so you don't get accidental repeats.",

Check warning on line 647 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Line should be 200 characters or less; currently it has 312 characters (line_length)
longDescription: "",
category: "Navigation",
iconSymbol: "hare",
Expand All @@ -661,7 +661,7 @@
name: "Ben Vallack Nav",
tagline: "Your fingers stay put, the keyboard changes",
shortDescription:
"Navigate, copy, paste, and switch tabs without your fingers leaving the home row. Inspired by [Ben Vallack](https://www.youtube.com/@BenVallacksKeyboards) — hold an index finger to transform your keyboard into a navigation surface, with modifiers on the top row so nothing competes for space.",

Check warning on line 664 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Line should be 200 characters or less; currently it has 258 characters (line_length)
longDescription: "",
category: "Navigation",
iconSymbol: "rectangle.stack.badge.play",
Expand Down Expand Up @@ -700,7 +700,7 @@

// MARK: - Pack 16: KindaVim (visual-only companion)

/// Visual-only companion pack for the third-party

Check warning on line 703 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

A doc comment should be attached to a declaration (orphaned_doc_comment)
/// [KindaVim](https://kindavim.app) app. KindaVim handles all the Vim
/// modal behavior itself — our pack adds *no kanata bindings*. What
/// installing it does:
Expand Down Expand Up @@ -747,34 +747,16 @@
name: "Neovim Terminal",
tagline: "Vim motions in your terminal — words, lines, and search",
shortDescription:
"Hold Leader for Neovim-style motions inside approved terminal apps: h/j/k/l arrows, w/b word jumps, 0/$ line ends, undo, yank, and put. App-scoped — it activates only in terminals and coexists with the other Navigation rules.",

Check warning on line 750 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Line should be 200 characters or less; currently it has 236 characters (line_length)
longDescription: "",
category: "Navigation",
iconSymbol: "terminal",
quickSettings: [],
// Bindings mirror the collection's 19 mappings 1:1 —
// testPackBindingsMatchCollectionMappings enforces the count.
bindings: [
PackBindingTemplate(input: "h", output: "left", title: "H → Left"),
PackBindingTemplate(input: "j", output: "down", title: "J → Down"),
PackBindingTemplate(input: "k", output: "up", title: "K → Up"),
PackBindingTemplate(input: "l", output: "right", title: "L → Right"),
PackBindingTemplate(input: "w", output: "A-right", title: "W → Word forward"),
PackBindingTemplate(input: "b", output: "A-left", title: "B → Word back"),
PackBindingTemplate(input: "e", output: "A-right", title: "E → End of word"),
PackBindingTemplate(input: "0", output: "M-left", title: "0 → Line start"),
PackBindingTemplate(input: "4", output: "M-right", title: "$ → Line end"),
PackBindingTemplate(input: "g", output: "M-up", title: "G → Document top/bottom"),
PackBindingTemplate(input: "/", output: "M-f", title: "/ → Find"),
PackBindingTemplate(input: "n", output: "M-g", title: "N → Next match"),
PackBindingTemplate(input: "y", output: "M-c", title: "Y → Yank (copy)"),
PackBindingTemplate(input: "p", output: "M-v", title: "P → Put (paste)"),
PackBindingTemplate(input: "x", output: "del", title: "X → Delete character"),
PackBindingTemplate(input: "r", output: "M-S-z", title: "R → Redo"),
PackBindingTemplate(input: "d", output: "A-bspc", title: "D → Delete previous word"),
PackBindingTemplate(input: "u", output: "M-z", title: "U → Undo"),
PackBindingTemplate(input: "o", output: "M-right ret", title: "O → Open line below"),
],
// Intentionally empty: table-style packs (Vim Navigation, Mission
// Control, Numpad) leave bindings empty so Pack Detail renders the
// collection's mappings via MappingTableContent — the collection's
// 19 motions are the single source of truth.
bindings: [],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve Neovim key suggestions after emptying bindings

When this pack's bindings are emptied, Pack.affectedKeys becomes empty because it is derived only from bindings, and PackRegistry.packsTargeting(kanataKey:) only considers affectedKeys plus suggestedForKeys. Since this pack does not add any suggestedForKeys, selecting any Neovim motion key such as h, j, k, or / in the Mapper inspector will no longer surface the Neovim Terminal pack, even though it did before via the explicit bindings. Add representative suggestedForKeys when moving the mappings to the collection table.

Useful? React with 👍 / 👎.

associatedCollectionID: RuleCollectionIdentifier.neovimTerminal
)

Expand All @@ -786,7 +768,7 @@
name: "Sequences",
tagline: "Press keys one after another to trigger layers and actions",
shortDescription:
"Build multi-key sequences like Leader → W → M that activate layers or run actions. Like chords, but ordered — keys are pressed in succession instead of together. Starts empty; add your own sequences in the editor.",

Check warning on line 771 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Line should be 200 characters or less; currently it has 224 characters (line_length)
longDescription: "",
category: "Productivity",
iconSymbol: "arrow.right.arrow.left.circle",
Expand All @@ -803,7 +785,7 @@
name: "KindaVim",
tagline: "Vim-style navigation for any macOS app via KindaVim.app",
shortDescription:
"Shows your KindaVim mode (Normal, Insert, Visual) in the overlay header. The overlay adapts — Vim hints in Normal mode, clean keyboard in Insert.\n\nDisplay only — no key remapping. Requires KindaVim.app.",

Check warning on line 788 in Sources/KeyPathAppKit/Services/Packs/PackRegistry.swift

View workflow job for this annotation

GitHub Actions / code-quality

Line should be 200 characters or less; currently it has 215 characters (line_length)
longDescription: "",
category: "Navigation",
iconSymbol: "keyboard.macwindow",
Expand Down
10 changes: 4 additions & 6 deletions Sources/KeyPathAppKit/UI/Gallery/PackDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -473,12 +473,10 @@ struct PackDetailView: View {
/// interactive keyboard + modifier controls instead of the generic
/// tap-hold picker.
var isHomeRowModsPack: Bool {
let homeRowKeys: Set = ["a", "s", "d", "f", "j", "k", "l", "scln", ";"]
let inputs = Set(pack.bindings.map { $0.input.lowercased() })
// Consider it a home-row pack if at least 4 of its bindings are on
// the home row — covers light and full variants without listing
// every combination.
return inputs.intersection(homeRowKeys).count >= 4
// Exact match — the old ≥4-home-row-bindings heuristic misfired on
// any Vim-flavored pack whose bindings happen to use j/k/l/d
// (Neovim Terminal rendered the HRM editor as its detail body).
pack.associatedCollectionID == RuleCollectionIdentifier.homeRowMods
}

/// Match the pack to an existing `RuleCollection` that carries a
Expand Down
Loading