Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
my keyboard has some extra keys (F13...F22) and I would like to use those under KDE. Pressing those keys in the command line results in the message keyboard: unrecognized scancode ( number ) - ignored
I searched and found a site ( http://howtos.linux.com/howtos/Keyboard-and-Console-HOWTO-14.shtml ) which described how to find out the scancodes for those keys. That worked so far. Next I should connect the scancodes with free keycodes. Moreover I found out that the keycodes 89...95 and 120...127 are not used with my current keyboard-layout (Generic 105 keys). I tried to connect scancode 5e de (key F13) with keycode 89 $setkeycodes 5ede 89 but an error message returns KDSETKEYCODE: The argument is invalid
failed to set scancode 5ede to keycode 89
I searched further and found the program xev. This program does return keycodes for the extra keys. But unfortunately the keycodes which are returned are equal to those of some common keys. As example F14 generates the same keycodes as End.
What do I need to do so that the special keys on my keyboard can be used properly?
Keyboard: Siemens Nixdorf PS/2
Originally posted by avarus What do you actually want the keys to do?
I would like to have Cut, Copy, Paste and starting a program (eg Mozilla) on a single key under KDE.
If you want to use them as hot keys, you should try out 'lineakd' (google it and/or apt-get it). This will let you bind spare keys to commands without actually remapping them.
I have tried lineakd, beside that my keyboard is not supported, the program seems to expect already right defined keycodes. But I get the same keycodes, already used for common keys:
Key Keycode Defined as
F13: 102 Right
F14: 103 End
F15: 107 Delete
F16: 106 Insert
F17: 101 No Symbol
F18: 110 Pause
F19: 124 ISO_Level3_shift
F20: 127 No Symbol
F21: 126 KP_Equal
F22: Act as the Windows-Start-Menu key
OK, I'm guessing a bit here, but since nobody else has chipped in I suppose anything I say is better than nothing...
Firstly, the command you were trying with setkeycodes should be:
setkeycodes 5e 89 (or setkeycodes 0x5e 89)
The second number represents the key-up event and you can ignore it.
Unfortunately I'm not sure that this will help you. The keyboard driver in XFree86 is notoriously bad at recognising extra keys - I believe it bypasses the kernel mappings and reads the scancodes directly. XOrg uses an updated and more flexible driver model.
Having your keyboard unsupported in lineak is not a problem as the config file is easy to write, but if they keys are being recognised as Right,End,etc in xev this is a non-starter as you say.
Also, I don't believe it is possible to bind keys to Cut/Copy/Paste as the commands to do this vary between programs (often Ctrl+C but not always). Starting Mozilla is easier to achieve.
Sorry for not being much help. Documentation for keyboard support under Linux is almost impossible to find - the best place to start is the README files hiding under /usr/lib/X11.
at least setkeycodes is now working and while pressing the non default keys I do not get keyboard: unrecognized scancode messages any more.
Thanks to you I definitely know now that the translation of the scancodes to the keycodes on the Console and X-Window are independent. So setkeycodes and loadkeys is not what I need.
I searched a little bit and found http://www.infosun.fmi.uni-passau.de/~nils/type6/details.html Beside that the Page is a little bit older, the scancode to keycode translation seems definitely be hard-coded in XFree86.
Perhaps I will try to modify the source code as described on the page according to my keyboard when I have a lot of free time left.
Glad to be of use. If you are going as far as modifying the source, you may first want to see if Xorg handles the keyboard properly. I'm told that you can get the Xorg deb packages for Ubuntu and install them, otherwise check this: