[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to add hwdb of keyboard

From: Stefan Huchler
Subject: Re: how to add hwdb of keyboard
Date: Mon, 14 Sep 2020 23:41:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

I forked now the eudev definition to add my hwdb data:

(add-before 'build-hwdb 'add-my-hwdb-file
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let ((out (assoc-ref outputs "out")))
                             (string-append out 
                           (lambda (port)
"keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPadX220*\n" port)
                             (display "KEYBOARD_KEY_7b=compose\n" port)
                             (display "KEYBOARD_KEY_39=enter\n" port)
                             (display "KEYBOARD_KEY_79=space\n" port)
                             (display "KEYBOARD_KEY_70=tab\n" port)
                             (display "KEYBOARD_KEY_0f=backspace\n" port)
                             (display "KEYBOARD_KEY_3a=home\n" port)
                             (display "KEYBOARD_KEY_1c=end\n" port)
                             (display "KEYBOARD_KEY_0e=backspace\n" port)
                             (display "KEYBOARD_KEY_7d=backspace\n"

Is there a way to make guix system priotise my modified eudev over the
upstream one?

Stefan Huchler <> writes:

> I build a package for it:
> (define-module (x220-hwdb)
>   #:use-module (guix packages)
>   #:use-module (guix download)
>   #:use-module (gnu packages compression)
>   #:use-module (guix build-system copy)
>   #:use-module (guix licenses))
> (define-public x220-hwdb
>   (package
>    (name "x220-hwdb")
>    (version "1.0")
>    (source (origin
>           (method url-fetch)
>           (uri 
> "";)
>           (sha256
>            (base32
>             "0rx791b7mq5visa9ckyf7py4lz5ml51hn4mzz4rmlpnlrcds4x8v"))))
>    (build-system copy-build-system)
>    (inputs `(("unzip" ,unzip)))
>    (synopsis "Bla")
>    (description "Bla bla bla")
>    (home-page "";)
>    (license gpl3+)))
> and tried to link it to the expected location:
> (service special-files-service-type
>                 `(("/etc/udev/hwdb.d/90-X220-keyboard.hwdb"
>                    ,(file-append x220-hwdb "90-X220-keyboard.hwdb"))))
> the problem is that the hwdb is compiled but read only, so the file must
> basically be there before the eudev package builds this db.
> Is there a better way doing this?
> Stefan Huchler <> writes:
>> I use a custom keyboard layout on one of my laptops:
>> I use a hwdb which has the advantage that it works on tty and x11 and
>> that it's keyboard specific so if I connect a external keyboard it does
>> not swap keys on it.
>> I would be ok with giving up the keyboard specific part, I could live
>> with X11 only for a start, but I would like to have it in the config.scm
>> file configured and not only in some home based modifications.
>> Any idea how to do that best in guix, patching a custom my-modified-dvorak
>> keyboard-layout into the xkeyboard-config package maybe?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]