1.29.0 • Published 2 days ago

karabiner.ts v1.29.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

karabiner.ts

License Coverage Status Wallaby.js npm deno module

Write Karabiner-Elements configuration in TypeScript.

Why karabiner.ts

karabiner.ts is heavily inspired by Goku. Compared to the edn format, it allows for:

  • Easier-to-understand TypeScript/JavaScript syntax
  • Strong-typed abstractions and key aliases with IDE support
  • Structured config files instead of one big file

Learn More

Using the Online Editor

  1. Write config in the online editor. (Optional: fork the editor to save the config for later editing)
  2. Copy the generated JSON then add to Karabiner-Elements.

Using Node.js

npm

Option 1

npx create-karabiner-config@latest

The default directory name is karabiner-config. You can pass another project-name:

npx create-karabiner-config@latest [project-name]

Then:

  1. Write your key mapping in src/index.ts.
  2. Set the profile name. Create a new Karabiner-Elements profile if needed.
  3. Run npm run build.

To update to the latest version, run npm run update (or npm update karabiner.ts).

Option 2

  1. Download (or clone | fork) the examples/starter repo.
  2. Run npm install.

Then write and build the config same as Option 1.

Option 3

npm install karabiner.ts

(or install with yarn, pnpm, etc) then call writeToProfile() from any Node.js script in your preferred way.

Using Deno

deno module

In a Deno script file (replace {version}):

import { rule, writeToProfile } from 'https://deno.land/x/karabinerts@{version}/deno.ts'

writeToProfile('Default', [
  // rule(...
])

Then run it with:

deno run --allow-env --allow-read --allow-write {filename}
1.29.0

2 days ago

1.28.0

2 days ago

1.27.0

5 months ago

1.26.0

6 months ago

1.25.0

8 months ago

1.19.0

11 months ago

1.18.1

12 months ago

1.18.0

12 months ago

1.17.0

1 year ago

1.18.3

11 months ago

1.19.1

11 months ago

1.18.2

12 months ago

1.21.0

10 months ago

1.22.0

10 months ago

1.20.0

11 months ago

1.23.0

10 months ago

1.24.0

9 months ago

1.16.0

1 year ago

1.15.0

1 year ago

1.14.0

1 year ago

1.13.0

1 year ago

1.12.0

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.0

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago