If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

keyboard wheel thingy problem

Hi,

I have a small problem with my keyboard wheel. On a previous install of my ATI drivers (8.13.something I think) the wheel worked fine (105 key generic intl keyboard selected via fglrxconfig). After installing 8.16.20 drivers it doesn't work although I selected the same option. It doesn't even work when I re-install the old drivers. Now, I guess that I probably should add something to my xorg.conf keyboard settings, but am not exactly sure what.

Help, anyone?

Oh, and BTW the keyboard is some cheap Sweex model, but it has plenty of optional and extra keys (of which only some work under Linux). Makes me also wonder if there is any way to enable multimedia (play, pause, stop, prev, next, volume up, down) keys under Linux?

There are two popular wats - LinEAK and configuring through the inet keyboard definitions in /etc/X11/xkb/symbols/inet. However I don't see a definition for your Keyboard. If you are using the standard PC-104 keyboard definition in xorg.conf then you will not see any of the extra keys working. Try running the xev app and press each of your extra keys to see what their definitions are. For example when running xev I get this when pressing my volume up -

Post back the part for each key where it says "keycode 176" with its relative code and what the key does, and I'll see if I can patch something together for you. That will enable the keys, then we can look at assigning them.

btw, if vol/mute keys would control mixer, i'm afraid they won't work anyway. My speakers (4.1 Cambridge Soundworks + SB Live! soundcard) are connected via digital output, and I haven't still found a way to control their volume from Linux. You wouldn't perhaps know how to fix that little problem?

... there are also some windows-app launching buttons for which xev registers several keys/codes pressed at once (for ex. 115+26, I'm guessing winkey+e, for My Computer) and some of them just close xev down (like MS Word button)

...and, alas, xev doesn't react at all to my keyboard wheel (which can also be clicked, btw). Now, unfortunately that's the most important thing for me right now, since i don't have a mouse with a wheel (have a 3-button Logitech Pilot), that being the main reason for wich I posted.

Also, I have just downloaded that linEAK, and playing around with it to see what it can do...

Well the good news is that Play/Pause, Stop,Back,Forward,VolUp,VolDown and mute are the standard keycodes. You can use the Trust Keyboard settings to activate these at least, I can talk you through this later. I will try to get the details for the others first and maybe get them all done together. I am doing some research and will be back.

Are you speakers affected when you use say Kmix to turn them up and down?

No, the only thing from kmix that works is the surround control, wich for some strange reason just moves the sound from my back speakers to my front ones and vice versa (the speakers are connected properly, if you're wondering, under WinXP everything works like a charm, of course with Creative drivers ). Every other setting, be it from kmix or Yast->Hardware->Sound->Volume settings doesn't do anything.

Sorry, made a mistake there. Volume can be controlled from AmaroK, for example, but that's AmaroK's output, not the card one's. Sound in other apps doesn't seem to be affected.

And, I have managed to get almost all the keys working! I used xev to write down the codes, just like you told me. Now, I edited the lineakkbd.def file and added my keyboard model (named it MYKEYB) and keys, set it with lineakd -c MYKEYB, edited lineak.conf and added macros and commands. There are just a few unresolved things:

1. Is there a way to start multiple macros/commands with linEAK depending on wich app is running? For example I want my sound keys to work in xine and amaroK and so forth and so on, since they are still of no use when controlling the mixer itself?

2. I've set the "halt" command to power-off key, but I need root privileges to run it. How safe it is to change permissions (and is it even possible?) on the file so that I can run it as a user?

3. And, I am repeating myself over and over, but keyboard wheel is still dead. However, I have looked at the /var/log/messages and found out that wheel generates an unknown code when pressed but nothing when scrolled. I found a way to set the keycode for pressing it (via setkeycodes), but that feature is not particulary useful to me.

I use KHotKeys in KDE Control Centre to define my macros if that is any good. It's a bit weird to get used to it, but when you do it is great. If you can get your head around DCOP you'll be flying. It provides a nice direct interface with your application. On the other side it will also be possible to set different actions according to conditions, i.e. if amarok is open, send a DCOP request or don't run at all.

Try

Code:

showkey -s

To dump out the wheel keycodes. You will need to run it as root, so su - to it. It will run for 10 seconds after the last keypress so don't freak out when you can't stop it. May require a CTRL+C after it finishes too...

If that doesn't pick up a scancode then I'm not really sure how to make X see it.

Yeah, I figured the KHotKeys out already. Set up some basic app launch controls from it for my app keys. I'll probably start messing around more with it when I have the time.
I tried showkey -s but it just ignores any wheel actions. Now, what is strange is that after I ran setkeycodes for the wheel press (set its keycode to 22x, can't remember exactly the code), and xev properly recognized it when pressed, now (after a system restart and I didn't put the command in boot.local script) the key has completely vanished! There is no message in /var/log/messages about an unknown key, and neither xev, showkey or lineakd register the key! I'm afraid I'll just have to leave the whole thing to rest and buy a mouse with a wheel
Yet, I still can't understand why the d**n wheel thing worked before I updated the ATI drivers (did they mess up something with X.org perhaps?)

I FIXED IT! I FIXED THE D**N THING! It was in xorg.conf after all, but had nothing to do with the keyboard section. It seems that for some reason, keyboard wheel events are handled like mouse ones (common PS/2 controller, perhaps?). So I just changed the protocol and ZAxisMapping functions in xorg.conf for a wheel mouse, like this: