Latvian Apostrofs keyboard layout for macOS — modernized fork of Atis Āre's original work
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
claude a316ecf2b1
All checks were successful
Test / validate (push) Successful in 8s
ci: note runner now runs as non-admin _forgejo (infra-docs#292)
2026-06-02 13:47:54 +03:00
.forgejo/workflows release.yml + build-pkg.sh: /simplify polish bundle (latvian-apostrofs#7) 2026-05-10 13:21:31 +03:00
.gitignore Add PKG installer + Forgejo Release pipeline + Homebrew Cask integration (#4) 2026-05-09 23:10:46 +03:00
build-pkg.sh release.yml + build-pkg.sh: /simplify polish bundle (latvian-apostrofs#7) 2026-05-10 13:21:31 +03:00
install.sh /simplify cleanup: terminal-output path drift + counter-flag (#3) 2026-05-08 16:06:53 +03:00
latvian_apostrofs.icns Initial commit: Latvian Apostrofs keyboard layout 2026-03-22 14:03:23 +02:00
latvian_apostrofs.keylayout Initial commit: Latvian Apostrofs keyboard layout 2026-03-22 14:03:23 +02:00
README.md ci: note runner now runs as non-admin _forgejo (infra-docs#292) 2026-06-02 13:47:54 +03:00
uninstall.sh README: lay-person-friendly install paths + uninstall.sh safety guard (#5) 2026-05-10 07:13:45 +03:00

Latvian Apostrofs — macOS Keyboard Layout

A Latvian keyboard layout for macOS that restores standard programmer-friendly key assignments while keeping Latvian characters accessible:

  • Shift+3# (hash) instead of £ (pound)
  • Alt+4 (euro)
  • All Latvian characters (ā, č, ē, ģ, ī, ķ, ļ, ņ, š, ū, ž) via standard combinations

Tested on: macOS Tahoe 26.4.1 (arm64), May 2026 — verified end-to-end (layout visible in Input Sources picker as Latvian (apostrofs); Shift+3 → #; Alt+4 → ; ā/ī/š/ņ/etc. all reachable). The .keylayout XML format is unchanged since macOS 10.6, so earlier versions should also work but are no longer tested.

What this fork adds

The .keylayout and .icns files are unchanged byte-for-byte from Atis Āre's 2013 original (see Credits and License). This repository adds:

  • A signed PKG installer published as a Forgejo release
  • A Homebrew Cask
  • An automated install.sh / uninstall.sh for per-user install (bash, set -euo pipefail, idempotent)
  • A Forgejo Actions workflow that lints the scripts and pins the data files via SHA-256 byte-stability check on every push

Installation

Pick one of the three paths below — they all install the same layout, just to different locations.

Path Install location Admin password macOS Tahoe (26.x)
PKG /Library/Keyboard Layouts/ (system-wide) yes (one prompt) requires logout/login after install
Homebrew /Library/Keyboard Layouts/ (system-wide) yes (one prompt) requires logout/login after install
install.sh ~/Library/Keyboard Layouts/ (per-user) no works immediately, no logout

Why three paths? macOS Tahoe scans /Library/Keyboard Layouts/ only at login, so system-wide installs (PKG, Homebrew) need a logout/login before the layout shows up in the Input Sources picker. The per-user path ~/Library/Keyboard Layouts/ is hot-rescanned, so install.sh works immediately. For a single-user Mac on Tahoe, install.sh is the smoothest option. PKG and Homebrew are better for shared machines and for users who prefer not to use Terminal.

Path 1 — PKG installer (system-wide, easiest for non-Terminal users)

  1. Download LatvianApostrofs-<version>.pkg from the latest release.
  2. Double-click the downloaded .pkg and follow the installer (one admin password prompt).
  3. Log out of macOS and log back in — required on macOS Tahoe so the layout registers with the input system.
  4. Continue to Activate the layout below.

Path 2 — Homebrew Cask

brew tap ojars/pareizrakstiba https://git.kapteinis.lv/ojars/homebrew-pareizrakstiba
brew install --cask apostrofs

This downloads and runs the same PKG as Path 1 (one admin password prompt). Log out and log back in after install on macOS Tahoe, then continue to Activate the layout below.

Path 3 — install.sh (per-user, no admin password, immediate)

git clone https://git.kapteinis.lv/ojars/latvian-apostrofs
cd latvian-apostrofs
./install.sh

Don't have git? Click the green Code button at the top of the repo page, choose Download ZIP, double-click to unzip, then in Terminal cd into the unzipped folder and run ./install.sh. (If you see Permission denied, run chmod +x install.sh first.)

The script copies the two layout files to ~/Library/Keyboard Layouts/. No logout needed — continue straight to Activate the layout below.

Activate the layout

Same for all three install paths.

  1. Open System Settings → Keyboard → Text Input → Edit… (Latvian-localized macOS: Sistēmas iestatījumi → Klaviatūra → Teksta ievade → Rediģēt…) (macOS 12 and earlier: System Preferences → Keyboard → Input Sources)
  2. Click +, scroll down to Others, and add Latvian (apostrofs).
  3. Click Done.

⚠️ Apple ships a built-in layout simply called Latvian that looks similar in the picker. Make sure you pick Latvian (apostrofs) — they are different layouts.

If "Latvian (apostrofs)" doesn't appear in the Others list, log out and log back in once.

Verify it works

Switch to Latvian (apostrofs) via the input-method indicator in the menu bar, then open TextEdit and type:

  • Shift+3 → should produce # (not £)
  • Alt+4 → should produce
  • Hold Alt and type a vowel → should produce its long form (ā, ē, ī, ū)

If those work, you're done.

Before you uninstall — important

⚠️ Switch your input source AWAY from "Latvian (apostrofs)" before uninstalling. macOS Tahoe will crash the Terminal session that initiates the uninstall if "Latvian (apostrofs)" is the currently-selected input source when its .keylayout file is removed. Click the menu-bar input-method indicator and pick a different layout (e.g. ABC Extended) first, then run the uninstall command.

Uninstall

After switching to a different input source (see warning above):

Install path used Uninstall command
PKG sudo rm "/Library/Keyboard Layouts/latvian_apostrofs.keylayout" "/Library/Keyboard Layouts/latvian_apostrofs.icns" && sudo pkgutil --forget lv.kapteinis.latvian-apostrofs
Homebrew brew uninstall --cask apostrofs
install.sh ./uninstall.sh

Then in System Settings → Keyboard → Text Input → Edit…, select Latvian (apostrofs) and click to remove it from your active inputs.

Credits and License

The macOS keyboard layout file (latvian_apostrofs.keylayout) and icon (latvian_apostrofs.icns) are the original work of Atis Āre (pods.lv). The original author did not specify a license; all rights to the layout files belong to Atis Āre.

This repository is a modernized fork maintained by Ojārs Kapteinis — installer scaffolding (PKG, Homebrew Cask, install.sh, release pipeline) has been added, but the layout files themselves are unchanged from the 2013 original.