diff --git a/acct-group/keyd/keyd-0.ebuild b/acct-group/keyd/keyd-0.ebuild
new file mode 100644
index 000000000..c62d194ee
--- /dev/null
+++ b/acct-group/keyd/keyd-0.ebuild
@@ -0,0 +1,8 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit acct-group
+
+ACCT_GROUP_ID=-1
diff --git a/acct-group/keyd/metadata.xml b/acct-group/keyd/metadata.xml
new file mode 100644
index 000000000..12e9173ac
--- /dev/null
+++ b/acct-group/keyd/metadata.xml
@@ -0,0 +1,9 @@
+
+
+
+
+ ston
+ ston.jia@qq.com
+
+
+
diff --git a/app-misc/keyd/Manifest b/app-misc/keyd/Manifest
new file mode 100644
index 000000000..47782f954
--- /dev/null
+++ b/app-misc/keyd/Manifest
@@ -0,0 +1 @@
+DIST keyd-2.4.2.tar.gz 640567 BLAKE2B 4ef65d32ccda420a514366ea3d5337ba0b54f29697aaa3cc2aee3fe9132d1717e87bf9e7f65e58504c80b8e4e45e3b1ec5660d524f2e101435034360d7f86e36 SHA512 185d548fdcec3bdd444a0e6d18045493ac082d7d98afcbd53ba6f1b17b39200eb472cf4d4162da80d0a5e623af359a629f325254df71b4adad9033622690f8e6
diff --git a/app-misc/keyd/files/default.conf b/app-misc/keyd/files/default.conf
new file mode 100644
index 000000000..3a708f634
--- /dev/null
+++ b/app-misc/keyd/files/default.conf
@@ -0,0 +1,11 @@
+[ids]
+
+*
+
+[main]
+
+# Maps capslock to escape when pressed and control when held.
+capslock = overload(control, esc)
+
+# Remaps the escape key to capslock
+esc = capslock
diff --git a/app-misc/keyd/keyd-2.4.2.ebuild b/app-misc/keyd/keyd-2.4.2.ebuild
new file mode 100644
index 000000000..8b10d44c6
--- /dev/null
+++ b/app-misc/keyd/keyd-2.4.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+DESCRIPTION="A key remapping daemon for linux"
+HOMEPAGE="https://github.com/rvaiya/keyd"
+SRC_URI="https://github.com/rvaiya/keyd/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="mirror"
+DEPEND="acct-group/keyd"
+RDEPEND="$DEPEND"
+
+src_prepare() {
+ sed -i "/-groupadd keyd/d" Makefile || die
+ default
+}
+
+src_install() {
+ default
+ rm -r "${D}"/usr/share/{man,doc} || die
+ dodoc docs/{CHANGELOG.md,DESIGN.md}
+ systemd_dounit keyd.service
+ insinto /etc/keyd
+ doins "${FILESDIR}"/default.conf
+ gzip -d data/{keyd,keyd-application-mapper}.1.gz || die
+ doman data/{keyd,keyd-application-mapper}.1
+}
diff --git a/app-misc/keyd/metadata.xml b/app-misc/keyd/metadata.xml
new file mode 100644
index 000000000..51354f41e
--- /dev/null
+++ b/app-misc/keyd/metadata.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ ston
+ ston.jia@qq.com
+
+
+ rvaiya/keyd
+
+