Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OK this is gonna be a brief tutorial on setting up the Logitech Elite Keyboard for use under KDE and X. XFree86 already has a keyboard layout premade for the Logitech-Elite keyboard. It's actually slightly different (the Elite has 2 additional keys, Go and Back) but other than that the layout is the same.
Look in the file /etc/X11/xkb/symbols/inet
At approximately line #1118 you should have an entry like this:
If your inet file doesn't have this entry then you probably have an older version. I got mine from XFree86 beta. But not to fear you can copy mine (copy everything between the code tags below into /etc/X11/xkb/symbols/inet) into your inet file and it will work just the same. Just choose an appropriate place to paste it, be careful not to paste between any { of these } only on the outside of them i.e. after } and before the next {.
I wanted to make the Go and Back keys work (the two little keys on the left side of the keyboard next to the scroll wheel) so what I did was I copied thew whole entry for the "Logitech Cordless Desktop Navigator" and modified it and renamed it like this:
NOTE: The two bold entries are what I added to enable the two side buttons Go and Back, also I renamed XF86Stanby to XF86User which matches the keyboard.
Now if you go to K Menu -> Configuration -> KDE -> Accessibility -> Keyboard Layout. Now check Enable Layouts and this should allow you to select a Keyboard from the Keyboard model pull-down menu. There are quite a few if you have the latest XFree86 installed. But unfortuneately Logitech Elite is not one of them... yet! Here's what you do to add it to the list.
Edit /etc/X11/xkb/rules/xfree86.lst
Scroll down to the Logitech entries and add a new entry like this.
Once again what is in bold is what I added to the file. NOTE: I put mine in alphabetical order like the rest, I don't think it matters.
So now you can go back to K Menu -> Configuration -> KDE -> Accessibility -> Keyboard Layout and when you use the Keyboard model pull-down menu the Logitech Elite should be listed along with the others.
So now your keyboard is ready to start assigning keys in KDE. But what if you don't use KDE and you want to be able to define the keyboard for say Blackbox or XFce? In that case you need to assign the keyboard from the /etc/X11/XF86Config-4 file. Everything is already setup to do that you only need to edit one more file.
Edit the file /etc/X11/xkb/rules/xfree86. Scroll down to the inet keyboards section
! $inetkbds =
Then I put the lable logielite in the same order I had placed it in the inet file (right after the freedom navigator), like this:
Of course you can verify the keys are working properly by running xev and pressing some keys. I verified the keys I added are working:
Code:
KeyPress event, serial 27, synthetic NO, window 0x2600001,
root 0x41, subw 0x0, time 179142, (181,2), root:(870,22),
state 0x10, keycode 234 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 characters: ""
KeyRelease event, serial 27, synthetic NO, window 0x2600001,
root 0x41, subw 0x0, time 179362, (181,2), root:(870,22),
state 0x10, keycode 234 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 characters: ""
KeyPress event, serial 27, synthetic NO, window 0x2600001,
root 0x41, subw 0x0, time 180752, (181,2), root:(870,22),
state 0x10, keycode 233 (keysym 0x1008ff5f, XF86Go), same_screen YES,
XLookupString gives 0 characters: ""
KeyRelease event, serial 27, synthetic NO, window 0x2600001,
root 0x41, subw 0x0, time 180945, (181,2), root:(870,22),
state 0x10, keycode 233 (keysym 0x1008ff5f, XF86Go), same_screen YES,
XLookupString gives 0 characters: ""
As you can see the XF86Go and XF86Back indicate that the keys are working.
Since each Windowmanager/Desktop environment has it's own unique way of assigning actions to these keys I'll not attempt to explain that here. I believe there is another thread similar to this one which deals with HOWTO assign events to Logitech keyboard.
So I think that is about it. I sure hope you found this useful.
<edit>Just a note about Xorg. Everything should be just about the same, if not a little easier. Xorg release 6.8.1 has a keyboard defined which is identical in layout to the Logitech Elite, its called Logitech iTouch Internet Navigator Keyboard SE The only difference I see is there are a couple keys with different names. If you are using KDE just select the keyboard from the Control Panel and everything should work.
It works fine using the 2.4.X kernel and of course some keys don't work with the 2.6.X kernel.
The xkb_symbols "logiinkse" is what you would use in your xorg.conf file. Remember when you switch to xorg the keyboard driver is xkb not keyboard, so you should have that in the xorg.conf file, something like this:
For those of you with USB problems Xorg also has this keyboard, Logitech iTouch Internet Navigator Keyboard SE (USB) that may solve some of your problems.
OK I edited the thread and added a link to a thread which deals with assigning events to the keyboard. I don't know if windowmaker is covered but if not you'll have to post a thread because I can't help you with that.
Thanks for this wonderful tutorial. It works just fine for my keyboard except the four keys: messenger/sms, webcam, iTouch, and Shopping. I have a regular logitech elite keyboard (not wireless.) xev doesn't recognize these keys but a tail of /var/log/messages states (for the "Shopping" key):
Code:
Feb 23 01:26:16 Phage64 atkbd.c: Unknown key pressed (translated set 2, code 0x94 on isa0060/serio0).
Feb 23 01:26:16 Phage64 atkbd.c: Use 'setkeycodes e014 <keycode>' to make it known.
Feb 23 01:26:16 Phage64 atkbd.c: Unknown key released (translated set 2, code 0x94 on isa0060/serio0).
Feb 23 01:26:16 Phage64 atkbd.c: Use 'setkeycodes e014 <keycode>' to make it known.
What should I do? they keycodes i enter it says are out of bounds? Looking at the inet file in your example that code does match up. It bothers me that the four keys that don't work have consecutive numbering (0x11, 0x12, 0x13, 0x14) curious
I am using gentoo with gnome window manager (regular metacity)
I noticed that too on my keyboard. I knew the keys worked at one time because I had Messenger/SMS mapped to ymessenger and Webcam was mapped to Camorama. So of course at first I thought that I had broken my keyboard and I just ignored the keys. Then when I saw your post I knew we both didn't break the same keys. Some more searching and I discovered the keys worked when I booted my 2.4 kernel. So thats where it stand right now. Something in the new 2.6.x kernel keyboard driver seems to not like those keys. If I find out anything more I'll let you know.
I don't really know if this is a bug or if I'm doing something wrong? I might go ahead and submit a bug report just in case.
First off, thanks so much for this information. Didn't think I'd be able to make my logitech elite keyboard use the extra buttons with nix. I had the same probs yall talked about with the 2.6.x kernels, currently I'm on 2.6.3, on gentoo. Anyway, this is how I got it working. First, as root I set the keycodes. You probably want to add this in to a startup script or something so it will do it with every boot.
#For the messenger key
setkeycodes e011 112
# For the webcam key
setkeycodes e012 116
# For the shopping key
setkeycodes e014 118
# For the itouch key
setkeycodes e013 120
Then I edited the xmodmap to use the new keycodes. Mine looks like this:
Now they should all be working. I changed the xmodmap simply because I couldn't find the right setkeycodes number to make them match what you already used. Like setkeycode e011 112 assigns it to key 239, *shrugs*, but this way works and I don't think it bothers any other keys that were defined already.
shryke
I was working with setkeycodes myself. I noticed I couldn't use a keycode above 127?
e.g.
setkeycode e011 127 #This works
setkeycode e011 128 #This tells me the keycode is out of range?
Also the keycodes don't seem to have any logical order, and they are not decimal like they are supposed to be but they are not hex either?
I then built my keyboard driver as a module (atkbd) so I could pass it parameters but had no luck there either. It supposedly has three different key sets you can choose with the set= parameter but I never got it to use anything other than the default set=2. I even modified atkbd.c and set it manually but it still used set 2? But I'm not a C programer so that doesn't prove anything.
Anyways, I still fiddle with it when I get some spare time. If any one figures out the mystery of the setkeycode numbering scheme please "clue me."
/bin/bash
I did read someplace that the keycodes wont go over 127, which is why I used the codes that I did. Also I couldn't figure out the numbering scheme either. I just credited it to the differences in how X and the kernel handle the keycodes. Doesn't X have its own unique keycodes separate from the kernel? Could be wrong *shrugs*
I did read someplace that the keycodes wont go over 127, which is why I used the codes that I did. Also I couldn't figure out the numbering scheme either. I just credited it to the differences in how X and the kernel handle the keycodes. Doesn't X have its own unique keycodes separate from the kernel? Could be wrong *shrugs*
Yes X does have its own way of doing things. Most likely (depending on how your XF86Config file looks) you are probably using the keycodes file in /etc/X11/xkb/keycodes/xfree86. This file basically gives each keycode a unique identifier .
e.g.
<END> = 103;
Also note in the file these lines:
Code:
xkb_keycodes "basic" {
minimum= 8;
maximum= 255;
And the keycodes do go up to 255, so I do think there is something wrong with the setkeycodes program.
What you actually did by using the setkeycodes program is you changed the identifier for the keys. If you look in the file /etc/X11/xkb/keycodes/xfree86 you'll see that the keycodes you set the keys to are actually already identified like this:
So actually you could skip the xmodmap file and just edit the /etc/X11/xkb/symbols/inet file if you setup your rc.local file to run the setkeycodes commands every time you boot.
I never checked to see if these keys are being used for something else, so don't blame me if there are problems. Also like I said this only applies to you if you use the keycodes file /etc/X11/xkb/keycodes/xfree86.
Kernel 2.6.4 (customized, not stock), SuSE 9.0, Logitech Elite Keyboard, PS/2 (So it's not a USB issue)
How did you come up with the scancodes for setkeycodes? (The e011, etc.) I tried using showkey -s before running the setkeycodes lines you mentioned, and nothing appeared when I hit any of the keys that stopped working (shop, itouch, sms, webcam). After I ran the setkeycodes lines, showkey -s would list keycodes for those buttons, but they aren't like the keycodes that are generated for other buttons (ex: E-Mail, Media, etc). Also, when I run xev to try and see what's going on, the keys that are "patched" back in - SMS, Webcam, etc - generate ButtonPush and ButtonRelease events... ?
The reason I ask how you found the scancodes is that I have another complete set of function keys located on my F-keys row, which used to work under 2.4, but doesn't work under 2.6 anymore.
Finally, did you submit that bug report? I think it might need to be sent in, I don't know why these keys stopped working, but i'm concerned whether there will be enough keycodes in 1-127 to program unique functions for all these buttons.
I just looked at the system logger while pressing the keys to see the first code (e011) you can do this by hitting ctrl+alt+F12 or typing 'tail /var/log/messages' (depending on your system logger.) You should see something like this:
Code:
Mar 15 17:02:27 Phage64 atkbd.c: Unknown key pressed (translated set 2, code 0xd8 on isa0060/serio0).
Mar 15 17:02:27 Phage64 atkbd.c: Use 'setkeycodes e058 <keycode>' to make it known.
Mar 15 17:02:27 Phage64 atkbd.c: Unknown key released (translated set 2, code 0xd8 on isa0060/serio0).
Mar 15 17:02:27 Phage64 atkbd.c: Use 'setkeycodes e058 <keycode>' to make it known.
So is it possible to get all the keys working under 2.6? (F keys too?) I just bought a Logitech MX Duo a few days ago, and i've tried a few things but maybe i don't quite understand what to do. Can it be done at all, or will it take a fix in the kernel?
There's a mention of a logitech-keyboard-fix in the 2.6.5-rc3-mm4 patch, but it says it's a fix for something that broke in 2.6.5-rc2 I think. Does anyone know anything more about it?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.