Microsoft 4000 keyboard.. found an ubuntu solution

Dear all,
I have just bought a new keyboard so I can alleviate a bit of my wrist pain.
I have found a guide for ubuntu for configuring buttons.
I wnated to ask you if you think

I can also start editing my files on my distribution or the above are only applied for ubuntu istallations.

I would like to thank you for your reply

Should apply to openSUSE as well.
Just one note though: in current openSUSE releases the udev files have been moved to /usr/lib/udev/ instead of the earlier /lib/udev/.

Actually, custom .hwdb file should really go in the /etc/udev/hwdb.d/ directory so they won’t be overwritten by udev updates. The original file in /usr/lib/udev/hwdb.d/ can be copied across and edited as required.

Reading the following man page

man udev

it is mentioned

The hwdb files are read from the files located in the system hwdb directory /usr/lib/udev/hwdb.d,
the volatile runtime directory /run/udev/hwdb.d and the local administration directory
/etc/udev/hwdb.d. All hwdb files are collectively sorted and processed in lexical order, regardless
of the directories in which they live. However, files with identical filenames replace each other.
Files in /etc have the highest priority, files in /run take precedence over files with the same
name in /lib. This can be used to override a system-supplied hwdb file with a local file if needed;
a symlink in /etc with the same name as a hwdb file in /lib, pointing to /dev/null, disables the
hwdb file entirely. hwdb files must have the extension .hwdb; other extensions are ignored.

Yes, that’s what is being told in that link anyway.

The original file in /usr/lib/udev/hwdb.d/ can be copied across and edited as required.

Or you can create a new one with your additions, having a different name like 61-keyboard-local.hwdb.

Yes, that works too.

(with root permissions)
cd /etc/udev/hwdb.d
bash: cd: /etc/udev/hwdb.d: No such file or directory

does it mean that I should create it or worry that this file does not exist on my system

Just create it.