Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 01-14-2005, 05:32 PM   #1
Registered: Jun 2004
Distribution: Turtle Kevux 0.8.8
Posts: 129

Rep: Reputation: 15
LFS system - customizing keyboard - what scan codes..?

Finally got a stable version out...

I'm trying to figure out how to figure out the scan codes for all the extra buttons that come on these pre-built computers..

2-system I am playing with at the moment: IBM Thinkpad and Dell Inspiron.
I have noticed that the Thinkpad and Inspiron both have specific keyboard support in Xorg6.8.1.

Heres the questions:
1) I have extra buttons on my keyboards, how do I figure out what scan codes they send when pressed?
2) Once past that, is there a way to customize what they do when they are pressed. (I can also program so if that is the case, could you point me in the correct direction??)

I am using something loosely near LFS-5.1.1, only a little closer to bleeding edge.
Old 01-14-2005, 06:31 PM   #2
Andrew Benton
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
If you open a shell and run xev it should tell you something about what key was pressed. Read man xev
I don't know how to make use of the information. Try reading man setkeycodes
Old 01-15-2005, 07:22 PM   #3
Registered: Jun 2004
Distribution: Turtle Kevux 0.8.8
Posts: 129

Original Poster
Rep: Reputation: 15
After also searching through LQ's forums for this problem. (and your help..) I came to this conclusion:

1) showkey fails to show my keycodes (only non-standard)
2) passing showkey -s revealed the following (touched up for easier reading):

kb mode was XLATE

| Press     | Release   | Button    |
| 0xe0 0x6c | 0xe0 0xec | e-mail    |
| 0xe0 0x32 | 0xe0 0xb2 | home      |
| 0xe0 0x65 | 0xe0 0xe5 | search    |
| 0xe0 0x66 | 0xe0 0xe6 | go        |
| 0xe0 0x67 | 0xe0 0xe7 | refresh   |
| 0xe0 0x68 | 0xe0 0xe8 | stop      |
| 0xe0 0x6a | 0xe0 0xea | backwards |
| 0xe0 0x69 | 0xe0 0xe9 | forwards  |
3) It seems that when it sends the initial NULL, X and showkey (without -s paramater) assume that is the end of the keysequence and stop. Thus all the applications I try seem to only get 0 / Null / Nothing at all.

4) I am currently looking at this as a possile solution, further testing to come:

Last edited by Yerp; 01-15-2005 at 07:26 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Customizing your keyboard in RH9 Murtin Linux - General 1 11-02-2006 08:42 AM
Customizing keyboard layout fossilet Debian 2 11-28-2004 09:55 PM
Kernel 2.6 and Extended Keyboard Codes davecs Linux - Hardware 1 05-30-2004 09:09 PM
Keyboard scan codes... jinksys Programming 1 09-03-2003 04:52 PM
Can Java detect keyboard escape codes? pdibona Programming 1 10-13-2002 08:37 AM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 05:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration