# Remapping keyboard while retaining touchpad's disable-while-typing functionality in Guix

**URL:** <https://forum.systemcrafters.net/t/remapping-keyboard-while-retaining-touchpads-disable-while-typing-functionality-in-guix/2102>\
**Category:** Guix\
**Created:** [August 21, 2026, 4:00pm UTC](https://forum.systemcrafters.net/t/remapping-keyboard-while-retaining-touchpads-disable-while-typing-functionality-in-guix/2102 "2026-08-21T16:00:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![norio](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@norio](https://forum.systemcrafters.net/u/norio)\
**Post date:** [August 21, 2026, 4:00pm UTC](https://forum.systemcrafters.net/t/remapping-keyboard-while-retaining-touchpads-disable-while-typing-functionality-in-guix/2102/1 "2026-08-21T16:00:00Z")

</div>

I would like to know how people are remapping their keyboard in Guix Systems, especially when they are using it in conjunction with a touch pad nearby. I wanted to remap the keyboard on my laptop, and I installed keyd package. It remapped the keys as I wanted, but the disable-while-typing (DWT) coordination with the touchpad was lost.

I learned that keyd creates a virtual keyboard, that DWT works for keyboard and touchpad marked as internal, but that this virtual keyboard is not marked internal. On the internet, the solution is to create

`/etc/libinput/local-overriedes.quirks`

.. (Path 2)

and enter info like

```auto
[Virtual Keyboard]
MatchUdevType=keyboard
MatchName=keyd virtual keyboard
AttrKeyboardInetgration=internal

```

.. (Content 1)

However, libinput of Guix System does not seem to be looking at this file, but instead, it seems to be looking at

`/gnu/store/<HASH>-libinput-<VERSION>/etc/libinput/local-overrides.quirks`

.. (Path 2)

cf.

> **[libinput won't recognize /etc/libinput/local-overrides.quirks](https://issues.guix.gnu.org/56801)**

I am about to create a custom package inheriting from libinput with output of Path 2 of Content 1. I will also replace all occurrences of libinput package in the package dependency graph and inputs to all the services. This sounds a lot of work for such a common task of keyboard remapping, and I am wondering if a simpler solution has been known. I would appreciate your kind suggestions.

---

<div class="post-metadata">

**Author:** ![juipeltje](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/juipeltje/32/1178_2.png) [@juipeltje](https://forum.systemcrafters.net/u/juipeltje)\
**Post date:** [August 21, 2026, 4:27pm UTC](https://forum.systemcrafters.net/t/remapping-keyboard-while-retaining-touchpads-disable-while-typing-functionality-in-guix/2102/2 "2026-08-21T16:27:42Z")

</div>

Unfortunately don’t have a solution to offer, but this post did make me check and realize DWT isn’t working for me either as a Keyd user. I had no clue that was a side effect of using Keyd. I guess it hasn’t bothered me enough since i didn’t even realize it was broken, but i would be interested in what the best way is to solve this as well.

---

<div class="post-metadata">

**Author:** ![aionfork](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/aionfork/32/1243_2.png) [@aionfork](https://forum.systemcrafters.net/u/aionfork)\
**Post date:** [September 4, 2026, 7:33pm UTC](https://forum.systemcrafters.net/t/remapping-keyboard-while-retaining-touchpads-disable-while-typing-functionality-in-guix/2102/3 "2026-09-04T19:33:47Z")

</div>

First off, hyprland and most of the other wayland compositors rely on `libinput-minimal`. it’s possible that you could get lucky, replace the inputs here, hit like 90% of the issues and … just end up with a few weird things? lol

- if you do `cat $libinputthings | strings | sort | uniq | grep '/gnu/store` or something along those lines with `libinput`, does that cause `/gnu/store/<HASH>` to show up?
- do you know if it’s `libinput-minimal` that causes the issue?

The libinput that’s signaling to alter touchpad behavior needs to be fairly priviledged i think

> I’m probably dumber than I look, since offhand I really can’t explain how Wayland is functionally distinct from X11. I usually need to refer to diagrams to grok this stuff in the moment

[Quick Review of "Nix Flakes and their Guix Equivalents" — Andrew Tropin](https://trop.in/blog/quick-review-of-nix-flakes-and-their-guix-equivalents#:~:text=There%20is%20a%20mechanism%20called,attrset%20and%20an%20old%20attrset).

This may help: Section 8 explains why package transformations are tough at the `operating-system` or `home-environment` level.

basically, if you want an overlay, you need to `(define my-operating-system (operating-system ...))` then reopen it with another definition, where you inherit, then modify the packages using [package-input-rewriting/spec](https://guix.gnu.org/manual/devel/en/guix.html#index-package_002dmapping)… i think.

- It would be better to map over the list of packages first, then pass that to the OS.
- It may work better if you reuse/recreate the way packages are identified by spec.

I haven’t done this yet. I’ve only barely messed with transformations in code, so I may be off-base and idk what the performance would be.

- The package you replace them with may need to be a `const`. i’m not sure.
- There’s an example of `package-input-rewriting` on [gwl](https://codeberg.org/guix/guix/src/commit/4de2d5f68f630e9a22ba206644449993da4cf45f/gnu/packages/package-management.scm#L2350-L2398)
- there’s another better example in [src/rde/home/services/emacs.scm](https://git.sr.ht/~abcdw/rde/tree/70a1881f09c939792eb2ed932dded1f16291a59f/src/rde/home/services/emacs.scm#L155-171)

There may be a clever way to get scheme to redefine the package’s symbol… but idk. Tropin probably would’ve done something simpler there. It looks like it requires a lot of control.

---

<div class="post-metadata">

**Author:** ![Trisk3lion](https://avatars.discourse-cdn.com/v4/letter/t/9e8a1a/32.png) [@Trisk3lion](https://forum.systemcrafters.net/u/Trisk3lion)\
**Post date:** [September 20, 2026, 8:02pm UTC](https://forum.systemcrafters.net/t/remapping-keyboard-while-retaining-touchpads-disable-while-typing-functionality-in-guix/2102/4 "2026-09-20T20:02:04Z")

</div>

I believe the only way at the moment (except just making a pull request to Guix main) is to create a alternative package for libinput-minimal and then either replacing or grafting it onto either sway or Hyperland.

This is how I solved for sway:

First define a variation of libinput-minimal but that looks for quirks in /etc/libinput:

```auto
(define-public libinput-sysconf
  (package/inherit libinput
    (name "libinput-sysconf")
    (inputs
     (fold alist-delete (package-inputs libinput)
           '("cairo" "glib" "gtk+" "libwacom")))
    (arguments
     (substitute-keyword-arguments arguments
       ((#:configure-flags flags ''())
        `(cons* "-Dlibwacom=false"
                "-Ddebug-gui=false" ;requires gtk+@3
                "--sysconfdir=/etc"
                ,flags))
       ((#:phases phases)
        `(modify-phases ,phases
           (add-after 'unpack 'dont-create-empty-dir
             (lambda _
               (substitute* "meson.build"
                 (("install_emptydir\\(dir_etc / 'libinput'\\)")
                  ""))))))))))

```

The length of name is important here as I will use grafting to replace libinput-minimal, and for that the lenght of the name needs to be the same.

And then I just define grafted version of sway that I then use in my config:

```auto
(define-public sway-grafted
  ((options->transformation
    '((with-graft . "libinput-minimal=libinput-sysconf")))
   sway))

```

You can of course go futher and replace all instances of libinput-minimal through grafting but for me this seemed to be enough.

---

<div class="post-metadata">

**Author:** ![aionfork](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/aionfork/32/1243_2.png) [@aionfork](https://forum.systemcrafters.net/u/aionfork)\
**Post date:** [September 23, 2026, 1:18am UTC](https://forum.systemcrafters.net/t/remapping-keyboard-while-retaining-touchpads-disable-while-typing-functionality-in-guix/2102/5 "2026-09-23T01:18:54Z")

</div>

Thanks for contributing a solution with a much cleaner explanation
