User manual
Linux Guide taskit GmbH
insmod /config/panelcard-knob.ko
To stop the driver enter:
rmmod panelcard-knob.ko
You can also compile the driver into the kernel, so that it is started automatically, by
changing the entry “Panel-Card Starterkit knob driver” from 'M' (compiled as module) to '*'.
9.3. Customizing the keymap of the matrix keyboard
A whole list of assignable keys like KEY_B in the first example can be found in the Linux
kernel header /include/linux/input.h of the Linux sources.
The macros and constants to modify the functioning of the input driver can be found on the
software CD in the input driver header portuxinput.h.
You need to include the portuxinput.h every time an application has to modify the keymaps
of functions of the input driver. For example if you create your application in the /develop
directory on the development system you will have to copy it from the starterkit-CD:
cd /develop
mkdir include
cp /dev/cdrom/inputdriver/*.h /develop/include.
Then you will have to include it in your application:
#include “/develop/include/portuxinput.h”
To customize the keymap of the matrix keyboard you have to open the input device ( /dev/
portuxinput ), change the content of the keymap struct and write it to the input device.
Every change in the keymap will be lost after the next reboot, so you have to include the
sourcecode for changing the keymap in your application or compile it as an extra tool that
is executed before you start you application.
Example 1: This code changes the third key in the first column of the matrixkeyboard to 'b':
/* This sample can be found on the starterkit cd:
/dev/cdrom/examples/input/matrixsample1.c */
#include <sys/ioctl.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/input.h>
#include "/develop/inputdriver/portuxinput.h" // input driver header
int main(void)
{
int fd = open("/dev/portuxinput", O_RDWR);
struct matrixentry entry = {
.x = 0, // key at column 1
.y = 2, // key at row 3
.layer = 0, // first layer
Page 29 of 65 Version 1.26 (2008-04-30)