[PATCH] services: xorg: Do not force driver for keyboard defaults.

  • Open
  • quality assurance status badge
Details
2 participants
  • Brice Waegeneire
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Brice Waegeneire
Severity
normal
B
B
Brice Waegeneire wrote on 3 Jul 2021 20:29
(address . guix-patches@gnu.org)
20210703182902.12675-1-brice@waegenei.re
Let xorg choose the correct driver for keyboards; if need be the driver
can be forced by the user on a device by device basis.

* gnu/services/xorg.scm (xorg-configuration->file)[input-class-section]:
Remove matching on device path and forcing the driver. Put each option
on a separate line.
---
gnu/services/xorg.scm | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 8ffea3b9dd..2c894ac6b9 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -225,27 +225,24 @@ EndSection"))
(define (input-class-section layout variant model options)
(string-append "
Section \"InputClass\"
- Identifier \"evdev keyboard catchall\"
+ Identifier \"keyboard defaults\"
MatchIsKeyboard \"on\"
- Option \"XkbLayout\" " (object->string layout)
+ Option \"XkbLayout\" " (object->string layout) "\n"
(if variant
(string-append " Option \"XkbVariant\" \""
- variant "\"")
+ variant "\"\n")
"")
(if model
(string-append " Option \"XkbModel\" \""
- model "\"")
+ model "\"\n")
"")
(match options
(()
"")
(_
(string-append " Option \"XkbOptions\" \""
- (string-join options ",") "\""))) "
-
- MatchDevicePath \"/dev/input/event*\"
- Driver \"evdev\"
-EndSection\n"))
+ (string-join options ",") "\"\n")))
+ "EndSection\n"))
(define (expand modules)
;; Append to MODULES the relevant /lib/xorg/modules
--
2.31.1
T
T
Tobias Geerinckx-Rice wrote on 3 Jul 2021 20:46
(name . Brice Waegeneire)(address . brice@waegenei.re)
87k0m7s04r.fsf@nckx
Brice,

Brice Waegeneire ???
Toggle quote (4 lines)
> Let xorg choose the correct driver for keyboards; if need be the
> driver
> can be forced by the user on a device by device basis.

Thanks, I think this is the right thing to do.

I hope someone will test this who (1) still uses ‘real’ Xorg (2)
doesn't use just the HIDs that came free with their laptop :-) I
do neither.

LGTM otherwise!

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYOCxVQ0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15/jcBAITTlctanVBgemANH3aGGtsRBvocVF1OpJZ8ZgYc
eoFsAP45Qhzo/GWEVruAU8Xw0FNTrONgiBNVqajrqomJOu6ODw==
=znhq
-----END PGP SIGNATURE-----

?