Udev Rules - Keychron

I’m having a problem with a Keychron keyboard and editing/adding udev rules so that I can use VIA to edit the keymap.

All the instructions I can find refer to editing/adding a file in /etc/udev/… which, I cannot do because I do not have write access to the files and directories in root.

Is there a “ublue way” to accomplish the same goal?

I am assuming you haven’t actually tried it. /etc should be writeable.

I have tried it. It did not work.

What error do you get?

I’m not at the machine at the moment, so can’t cut and paste, but essentially a “permission denied” when trying to write the udev rule(s) to the file.

You must’ve made a mistake. Either you forgot to sudo, or you mistyped some directory name like vi /etc/udevx/file (udevx does not exist) or something along those lines.

Try again when you get a chance as root should be able to add/edit files anywhere under /etc.

I’ve actually done this exact thing (add udev rules) here: Yoga Pro 9i 16IMH9 has udev spam log while charging - What is the best course of action here? - #6 by j0rge

Could be the text editor you’re using doesn’t have permissions.
You could use nano in the terminal

sudo nano /etc/udev/YourFile

If you’re on Bluefin Gnome’s text editor will let you modify /etc files.
Not sure what editor is used on Aurora.

Can you post your udev rule (s)?
I haven’t been able to get Via to work, despite editing/creating the rules suggested.

Of course! Google led me to a thread on the Arch forums on the subject and one of the posters there shared a link to the QMK github - https://github.com/qmk/qmk_firmware/blob/66d0d53dc1041ce148612ccde9da7ec78668ce7a/util/udev/50-qmk.rules

The file name you create should just be 50-qmk.rules

Even after doing that, though, I still had to go to Keychron’s website and download the JSON file for my specific keyboard and upload it to the web-based VIA app for it to be recognized. Once I did that, it worked fine. Feel free to PM me if you have any questions about that part of the process and I’ll be happy to help in any way I can.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.