Hi,
I found 2 ways to set up all buttons on my NSA310 (probably all NSA3xx). Since I did not found to much about it on the net, I decided to share it with you all.
1. Install https://github.com/wertarbyte/magmakeys. Works perfectly. Advantages:
- this is a perl script so you do not need to compile and I think that all needed libraries are present in the bodhi rootfs;
- contains ready to use debian start-up script
- it is able to distinguish key stoke obtained by pressing, holding and releasing of a button;
Disadvantages:
- you need to switch off the hal support (there is no HAL daemon in modern linux distributions) and give the input event file specifically (-d /dev/input/event0);
- you need to manually put all needed files in appropriate directories.
2. Through acpid. The problem with is that acpid allows only keys predefined in the sources (the input_layer.c file). Unfortunately, KEY_COPY and KEY_RESTART are absent till acpid-2.0.23 (which is the current version in debian jessie). So the are 2 ways.
- Exchange KEY_COPY and KEY_RESTART with something like KEY_SLEEP and KEY_SUSPEND in appropriate dts file (kirkwood-nsa3x0-common.dtsi in my case). Then you need to recompile.
- Update to acpid-2.0.25 or later. It already supports KEY_COPY and KEY_RESET.
In both cases, you need only one daemon for all buttons.
I found 2 ways to set up all buttons on my NSA310 (probably all NSA3xx). Since I did not found to much about it on the net, I decided to share it with you all.
1. Install https://github.com/wertarbyte/magmakeys. Works perfectly. Advantages:
- this is a perl script so you do not need to compile and I think that all needed libraries are present in the bodhi rootfs;
- contains ready to use debian start-up script
- it is able to distinguish key stoke obtained by pressing, holding and releasing of a button;
Disadvantages:
- you need to switch off the hal support (there is no HAL daemon in modern linux distributions) and give the input event file specifically (-d /dev/input/event0);
- you need to manually put all needed files in appropriate directories.
2. Through acpid. The problem with is that acpid allows only keys predefined in the sources (the input_layer.c file). Unfortunately, KEY_COPY and KEY_RESTART are absent till acpid-2.0.23 (which is the current version in debian jessie). So the are 2 ways.
- Exchange KEY_COPY and KEY_RESTART with something like KEY_SLEEP and KEY_SUSPEND in appropriate dts file (kirkwood-nsa3x0-common.dtsi in my case). Then you need to recompile.
- Update to acpid-2.0.25 or later. It already supports KEY_COPY and KEY_RESET.
In both cases, you need only one daemon for all buttons.