Skip to content

Commit 2406b39

Browse files
committed
kanata 1.7.0 (new formula)
Kanata is a software key remapper. If you are familiar with mechanical keyboard's firmware, like QMK, then you can think of kanata as a piece of software that gives any keyboard such powers. For example, I use kanata to move my arrow keys to the home row, to get something similar to vim's jikl movement in _any_ application without configuration. Kanata is inspired by and similar to kmonad. Kanata is implemented in Rust, originally targeted Linux and Windows, but recently grew MacOS support. On MacOS, it requires Karabiner VirtualHiDDevice Driver to function. This dependency is not handled by the current formula at the moment.
1 parent b5259e1 commit 2406b39

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Formula/k/kanata.rb

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
class Kanata < Formula
2+
desc "Cross-platform software keyboard remapper for Linux, macOS and Windows"
3+
homepage "https://github.com/jtroo/kanata"
4+
url "https://github.com/jtroo/kanata/archive/refs/tags/v1.7.0.tar.gz"
5+
sha256 "eb7e11511f77558d72b5b3b0c9defb04b269637e5c8a4ad9b45d21382e9247d2"
6+
license "LGPL-3.0-only"
7+
8+
depends_on "rust" => :build
9+
10+
def install
11+
system "cargo", "install", *std_cargo_args
12+
end
13+
14+
test do
15+
minimal_config = <<-CFG
16+
(defsrc
17+
caps grv i
18+
j k l
19+
lsft rsft
20+
)
21+
22+
(deflayer default
23+
@cap @grv _
24+
_ _ _
25+
_ _
26+
)
27+
28+
(deflayer arrows
29+
_ _ up
30+
left down rght
31+
_ _
32+
)
33+
34+
(defalias
35+
cap (tap-hold-press 200 200 caps lctl)
36+
grv (tap-hold-press 200 200 grv (layer-toggle arrows))
37+
)
38+
CFG
39+
40+
(testpath/"kanata.kbd").write(minimal_config)
41+
system bin/"kanata", "--check"
42+
end
43+
end

0 commit comments

Comments
 (0)