Skip to content

Commit a3b3a03

Browse files
committed
Release version 0.2.8
1 parent e81beb7 commit a3b3a03

File tree

10 files changed

+83
-32
lines changed

10 files changed

+83
-32
lines changed

ChangeLog

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
Fri Jul 6 00:25:10 EEST 2007 - Theodoros V. Kalamatianos <[email protected]>
2+
* Release 0.2.8
3+
* Fixed the auto-detection code so that it fails with an error when no
4+
input devices are present at all, rather than letting actkbd attempt
5+
to use /dev/input/event0 and fail with some misleading error message
6+
(reported by Jerome Borme).
7+
* Added a sample rule file for udev
8+
* Note that a udev rule is the recommended way to launch actkbd on Linux
9+
* Remove version.h - the version string is automatically set in the
10+
Makefile
11+
* Documentation updates
12+
113
Sun Aug 20 14:06:59 EEST 2006 - Theodoros V. Kalamatianos <[email protected]>
214
* Release 0.2.7
315
* Fixed a bug in the keyboard autodetection code, where the automatic

Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ prefix := /usr/local
1212
sbindir := $(prefix)/sbin
1313
sysconfdir := /etc
1414

15+
# Yes, I am lazy...
16+
VER := $(shell head -n 1 NEWS | cut -d : -f 1)
17+
18+
19+
1520
DEBUG :=
1621
CFLAGS := -O2 -Wall $(DEBUG)
22+
CPPFLAGS := -DVERSION=\"$(VER)\" -DCONFIG=\"$(sysconfdir)/actkbd.conf\"
1723

1824

1925

@@ -25,12 +31,9 @@ actkbd.o : actkbd.h
2531
mask.o : actkbd.h
2632

2733
config.o : actkbd.h config.c
28-
$(CC) $(CFLAGS) -c -o config.o config.c -DCONFIG=\"$(sysconfdir)/actkbd.conf\"
2934

3035
linux.o : actkbd.h
3136

32-
actkbd.h: version.h
33-
3437
install: all
3538
install -D -m755 actkbd $(sbindir)/actkbd
3639
install -d -m755 $(sysconfdir)

NEWS

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
0.2.7:
2-
* Fixed a bug in the keyboard autodetection code, where the automatic
3-
detection would fail if the first entry in /proc/bus/input/devices
4-
was not a keyboard (reported by Jerome Borme).
5-
* Improved the Linux-specific information in the README.
6-
* Minor bugfixes
1+
0.2.8:
2+
* Fixed the auto-detection code so that it fails with an error when no
3+
input devices are present at all, rather than letting actkbd attempt
4+
to use /dev/input/event0 and fail with some misleading error message
5+
(reported by Jerome Borme).
6+
* Added a sample rule file for udev
7+
* Note that a udev rule is the recommended way to launch actkbd on Linux
8+
* Remove version.h - the version string is automatically set in the
9+
Makefile
10+
* Documentation updates

README

+18-5
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,24 @@ In most cases, loading the `evdev' kernel module will be sufficient:
6161

6262
# modprobe evdev
6363

64-
In most Linux systems the device nodes to use are named /dev/input/eventX,
65-
where X is a decimal unsigned number, e.g. /dev/input/event0. If the /proc
66-
filesystem is mounted and accessible, actkbd should be able to detect a
67-
usable keyboard device. You should not need to manually specify one, unless
68-
there are multiple keyboards present.
64+
On Linux it is recommended that actkbd is launched using udev rules. This allows
65+
the administrator to use a different configuration for each keyboard, as long as
66+
udev can tell the devices apart. This method is far more reliable and flexible
67+
than using an init script, as it allows for proper support of hotplug events and
68+
removes the probability of the auto-detection code getting confused and causing
69+
problems.
70+
71+
In most Linux systems the device nodes to use are named /dev/input/eventX, where
72+
X is a decimal unsigned number, e.g. /dev/input/event0. If the /proc filesystem
73+
is mounted and accessible, actkbd should be able to detect a usable keyboard
74+
device. You should not need to manually specify one, unless there are multiple
75+
keyboards present.
76+
77+
Update: On newer kernels several special buttons (like the Power switch) may
78+
appear as input devices as well. There is no way for the auto-detection code to
79+
tell them apart and it is quite possible that the actual keyboard will not be
80+
the one actkbd will select. Using udev to start actkbd is the best way to avoid
81+
this problem.
6982

7083

7184

TODO

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
1. Items in the ToDo list:
22

3-
* Find out what happens if the keyboard device suddenly disappears - I have
4-
to find a USB keyboard to test this. Make sure we handle this gracefully -
5-
no a SIGSEGV is NOT graceful.
6-
73
* Perform some testing on non-IA32 platforms, especially on 64-bit and
84
big-endian CPUs - some external feedback is welcome.
95

@@ -32,13 +28,24 @@
3228

3329
* Autotools ?
3430

31+
32+
33+
2. Completed
34+
3535
* Research and update the documentation with information on how to couple actkbd
3636
with the hotplug subsystem, so that multiple keyboards can be supported. Any
3737
takers ?
38+
UPDATE: A sample udev file is now provided. Pretty simple, actually...
39+
40+
* Find out what happens if the keyboard device suddenly disappears - I have
41+
to find a USB keyboard to test this. Make sure we handle this gracefully -
42+
no a SIGSEGV is NOT graceful.
43+
UPDATE: actkbd acts as it should. Users using hotplugged devices can just
44+
ignore the error message when they remove the keyboard.
3845

3946

4047

41-
2. Features that will probably never be added:
48+
3. Features that will probably never be added:
4249

4350
* Check/Implement support for linux-2.4 kernels. I can't even remember whether
4451
those had a proper event interface...
@@ -56,6 +63,8 @@
5663
comes to mind). It would be simpler and much more efficient to setup the
5764
hotplug scripts to launch multiple actkbd instances, each with its own
5865
configuration file.
66+
UPDATE: There is now a sample udev rule file that can be adapted for multiple
67+
keyboards.
5968

6069
* Use select() to handle multiple keyboards, instead of just the first one,
6170
and get a USB keyboard to test it.

actkbd.h

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include <signal.h>
2626
#include <sys/types.h>
2727

28-
#include "version.h"
29-
3028

3129
#define UNUSED 0
3230

linux.c

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ int init_dev() {
6565
}
6666

6767
/* Compile the regular expression and scan for it */
68+
ret = -1;
6869
regcomp(&preg, "^H: Handlers=(.* )?kbd (.* )?event([0-9]+)", REG_EXTENDED);
6970
do {
7071
char l[128] = "";

actkbd.conf samples/actkbd.conf

File renamed without changes.

samples/udev.rules

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# udev rules for keyboards
2+
ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-9]*", GOTO="_INPUT_"
3+
GOTO="_END_"
4+
5+
6+
LABEL="_INPUT_"
7+
8+
# AT keyboard
9+
DRIVERS=="atkbd", ENV{__CFG}="/etc/actkbd/actkbd.atkbd.conf", GOTO="_KBD_"
10+
11+
GOTO="_END_"
12+
13+
14+
# Keyboards
15+
LABEL="_KBD_"
16+
17+
# Launch actkbd
18+
RUN+="/usr/sbin/actkbd -q -D -c %E{__CFG}"
19+
20+
21+
# End
22+
LABEL="_END_"

version.h

-11
This file was deleted.

0 commit comments

Comments
 (0)