How to Install Keysharp

Pick your system. The Windows and macOS buttons download the standard installer. The Linux button opens the installation instructions below; other download formats are listed beneath the buttons.

Windows

Portable ZIP

macOS

PKG installer

Linux

Installer (.sh)

Keysharp 0.0.0.17. Other architectures and individual packages are on the release page.

Keysharp needs the .NET 10 runtime. On Windows, install the .NET Desktop Runtime separately. The Linux and macOS installers help set up the matching runtime when it is missing.

Table of Contents

Windows

Use the x64 build on Intel or AMD systems. Windows on ARM has native ARM64 builds: MSI installer or portable ZIP. Install the .NET Desktop Runtime for the same architecture.

Run the downloaded .msi and follow the prompts. The installer can add Keysharp to PATH, associates .ks and .cks files with Keysharp, and adds a right-click Compile action for .ahk and .ks files which writes a .cks beside the script.

Once the .NET Desktop Runtime 10 is installed, skip to Verify the installation.

Portable use

To run Keysharp without installing it, download the ZIP instead, extract it, and run .\Keysharp.exe yourscript.ahk from that directory. No file associations or PATH entry are created.

macOS

macOS 15 or later is required. The main download button defaults to Apple silicon for M-series Macs. For an Intel Mac, use the Intel disk image or Intel PKG installer.

Open the .dmg and double-click Install Keysharp. Apple's Installer lets you install Keysharp and Keyview for all users in /Applications (with an administrator password), or only for yourself in ~/Applications. It downloads the .NET 10 runtime if needed.

Under Customize, terminal commands and opening Keysharp afterwards are selected by default; the VS Code shim is optional. Per-user terminal commands go in ~/.local/bin, which is added to your login shell's PATH. Open a new Terminal window before using them.

First launch

Note: Unsigned, ad-hoc-signed and locally self-signed builds are not notarized. If macOS blocks setup, try opening it, then choose System Settings → Privacy & Security → Open Anyway, following Apple's instructions.

For a trusted download whose quarantine flag prevents opening, clear that flag using the actual downloaded file name (the PKG works the same way):

xattr -dr com.apple.quarantine ~/Downloads/keysharp-*-osx-*.dmg

If an installed application is blocked for the same reason:

xattr -dr com.apple.quarantine /Applications/Keysharp.app /Applications/Keyview.app

For a per-user installation, replace /Applications with "$HOME/Applications".

Permissions

Input Monitoring, Accessibility and Screen Recording are requested when a script first needs them. macOS Permissions explains which features need which permission, and how to ask for them at startup.

PKG installation

The standalone .pkg uses the same Apple Installer and installation choices as Install Keysharp in the disk image. Double-click it in Finder, or run sudo installer -pkg <package>.pkg -target / for a system-wide installation.

Linux

Note: Linux automation uses two separately installed native components: keysharp-input for keyboard and mouse hooks and input synthesis, and keysharp-desktop for window automation and screen capture. Keysharp can run without them; see Linux Platform Support for feature requirements and permissions.

Ubuntu and compatible derivatives: Launchpad PPA

On Ubuntu 24.04 (noble), Ubuntu 26.04 (resolute), and derivatives using those bases, including Pop!_OS 24.04, prefer the Launchpad PPA for amd64 and arm64. Apt keeps installed packages updated:

sudo apt install software-properties-common
sudo add-apt-repository ppa:descolada/keysharp
sudo apt update
sudo apt install keysharp

Apt installs available recommended input and desktop components. On GNOME or Cinnamon, run keysharp-desktop enable-extension as your graphical user and log out and back in if requested. Remove portable copies of the components with their own uninstallers before switching to PPA packages; the Linux installation guide includes cleanup for the portable input v1.0.0 uninstaller.

The PPA does not target Debian or Ubuntu 22.04-based distributions such as Pop!_OS 22.04. On a derivative, check UBUNTU_CODENAME in /etc/os-release. Use the release installer below when the base is unsupported. See the Linux installation guide to diagnose package availability.

Debian and other distributions: release installer

Download keysharp-linux-setup.sh from the release, then run it from the download directory:

sudo sh ./keysharp-linux-setup.sh

Setup installs Keysharp and any missing or incompatible keysharp-input and keysharp-desktop components from their own releases. It uses Debian packages on Debian and Ubuntu, or archives on other supported systemd distributions. It creates the keysharp command and file associations. GNOME or Cinnamon extension activation may require a logout; setup reports when this is needed.

A healthy compatible native component is kept. To update the components too, rerun setup with --upgrade-components. For a local installation report, run sh ./keysharp-linux-setup.sh --diagnose. Component selection, requirements and repairs are covered in the Linux installation guide.

The individual Keysharp DEB package or portable tarball contains Keysharp alone. On Debian or Ubuntu, install the package with sudo apt install ./keysharp_<version>_amd64.deb (use arm64 instead of amd64 on ARM64); apt also installs available recommended native components. For an archive, extract it and run sudo bash ./install.sh, then install the native components separately. See Linux Platform Support for their operations and permissions.

Installing without root

Extract the Keysharp archive and run bash ./install.sh without sudo to install under $HOME/.local, or run app/Keysharp directly. The .NET 10 runtime and native runtime libraries must already be available. This does not install either native component; an existing system installation of them can still be used.

The desktop component also supports a user-owned authority, whose consent dialogs require zenity or kdialog. See Linux permissions for what its grants cover. Input hooks and synthesis require the system input component.

Verify the Installation

Save this as hello.ks:

MsgBox "Hello from Keysharp!"

Double-click the file. A message box appears if the installation is working.

It can also be run from a terminal, which is how you see any output a script writes:

keysharp hello.ks

On Windows the command is Keysharp.exe hello.ks, and for a portable copy it is .\Keysharp.exe hello.ks from the extracted directory.

Using an Editor

Keyview ships with Keysharp and needs no setup. See Editors for Keysharp Scripts for the alternatives.

To use thqby's AutoHotkey v2 Language Support extension for VS Code, point it at a shim named after the executable it expects. The macOS installer offers to create this; on Linux, create it manually:

mkdir -p ~/.local/bin
ln -sf "$(command -v keysharp)" ~/.local/bin/AutoHotkey.exe

Set the extension's interpreter path to that file. Syntax support and running scripts work; Windows-specific debugging, help and compiler integration do not.

Uninstalling

On macOS, settings are deleted by default. To keep them, choose Uninstall in the dialog instead of Uninstall and Delete Settings, answer no to deleting settings in the terminal, or run keysharp-uninstall --keep-settings. The .NET runtime and macOS privacy permissions are kept.

The uninstaller cannot revoke privacy permissions; remove Keysharp and Keyview under System Settings → Privacy & Security. If permissions misbehave after switching between differently signed builds, reset them:

tccutil reset All org.keysharp.keysharp
tccutil reset All org.keysharp.keyview

macOS can keep opening applications from the Trash, so empty it if removed applications stay associated with .ks or .ahk files.

Building from Source

Building requires the .NET 10 SDK. On Linux and macOS, clone the Keysharp branch of the Keysharp Eto fork beside the Keysharp repository. From the Keysharp repository:

git clone -b Keysharp --recurse-submodules https://github.com/keysharp-org/Eto.git ../Eto
dotnet build Keysharp.sln -c Debug

See the build guide for output locations, runtime dependencies and release packaging.

Next Steps

Problems?

Search or report installation problems in the Keysharp issue tracker. Include the Keysharp version, operating system, architecture, install method, and the complete error message.