-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This app depends on keyboard scancodes.
By default you need to be root to access the scancodes as they are on driver
level on Linux. What you can do is having read access to the files that offer
the scancodes; for this you need to see the file permissions of /dev/input
stuff:
ls -la /dev/input
total 0
drwxr-xr-x 4 root root 400 Oct 29 14:47 .
drwxr-xr-x 20 root root 3920 Oct 29 14:47 ..
drwxr-xr-x 2 root root 80 Oct 29 14:47 by-id
drwxr-xr-x 2 root root 200 Oct 29 14:47 by-path
crw-rw---- 1 root input 13, 64 Oct 29 14:47 event0
crw-rw---- 1 root input 13, 65 Oct 29 14:47 event1
crw-rw---- 1 root input 13, 74 Oct 29 14:47 event10
crw-rw---- 1 root input 13, 75 Oct 29 14:47 event11
crw-rw---- 1 root input 13, 76 Oct 29 14:47 event12
...
So, as you can see the files are owned by root
and the group is input
.
You simply have to add your user to the input
group:
# usermod -a -G input eeriemyxi
Here eeriemyxi
is the username.
This will give write access to /dev/input
stuff. If you are not okay with this,
consider adding a new user with a distinct password just to run the project.
You would add this user to the input
group, but not your primary user.
Now that you have access to the input events of all devices, the next logical thing to do is to know which out of the events is the one you're looking for. For that, you'll have to see the names of the USB devices and their IDs:
# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Power Button
/dev/input/event1: Lid Switch
/dev/input/event10: BY Tech Gaming Keyboard Mouse
/dev/input/event11: Wireless hotkeys
/dev/input/event12: PC Speaker
...
/dev/input/event6: BY Tech Gaming Keyboard
/dev/input/event7: BY Tech Gaming Keyboard System Control
/dev/input/event8: BY Tech Gaming Keyboard Consumer Control
/dev/input/event9: BY Tech Gaming Keyboard
Select the device event number [0-18]:
If evtest
program is unavailable, please see how to it install it for
your Linux distribution. (Search something like "evtest for <distro name>")
Once you have identified your keyboard, you should enter the ID in the prompt
and try typing something on your keyboard then see the logs to confirm the
event is working (otherwise try another one). In my case, I had to check both
6
and 9
.
Same as Windows' Manual Installation guide.
Follow the steps given for manual installation on Windows once you have access
to /dev/input
.
- Python
3.10
or newer.
git clone --depth 1 --branch main <REPO URL> mechvibes-lite
pip install ./mechvibes-lite
pip install git+<REPO URL>@main
Done! Now you should be able to use the app (try mvibes run
).
Other operating systems are not supported. I would have added support for Darwin, but I cannot afford the environment to test it out on. I will gladly accept contributions though.
[...]
It will look for your configuration files in
/etc/mechvibes-lite/
$XDG_CONFIG_HOME/mechvibes-lite/
/home/$USER/.config/mechvibes-lite/
- Where the package was installed.
In the same order as the list.
It will look for your configuration files in %APPDATA%/mechvibes-lite/
and if
it fails to find them there, it will default to the directory where the package
was installed.
This is a folder that the application expects that you'd have if you decide have your configuration file in another location than the default one.
As for what this folder is for, it is expected that you will keep your keyboard themes there.
This is the configuration file.
-
core
section contains information that is crucial to the app.-
core.input_event_code
is to specify the the input event id of your device. Only applicable for Linux users. See Identifying Your Device for more information.
-
-
active_theme
section contains information for the currently active theme.-
active_theme.id
is used to specify the name of the theme. It checks your configuration folder'sthemes
folder for the theme.
-