LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Mapping Multimedia Keyboard - Need more help (https://www.linuxquestions.org/questions/linux-hardware-18/mapping-multimedia-keyboard-need-more-help-260049/)

hazza 05-21-2005 10:26 AM

Since Xorg now includes a logiaccess XKB keyboard model for the Logitech Access Keyboard it's now changed to a matter of fixing it rather than including an entire keyboard layout. As of kernel 2.6.x the Messenger key (scancode 0xe011) must now be mapped with setkeycodes and must be modified in xkb to suit. The X86Search key needs to be added and X86MailForward and XF86Send keys fixed:

Code:

--- xkb/symbols/inet.orig        2004-11-19 02:32:11.000000000 +1030
+++ xkb/symbols/inet        2005-03-27 11:15:54.704805268 +0930
@@ -1197,15 +1197,16 @@
 
    key <I5F>        {        [ XF86Standby                ]        };
    key <I6C>        {        [ XF86Mail                ]        };
-    key <I11>        {        [ XF86Messenger                ]        };
+    key <FK16>        {        [ XF86Messenger                ]        };
    key <I12>        {        [ XF86WebCam                ]        };
 
    key <I32>        {        [ XF86HomePage                ]        };
+    key <I65>        {        [ XF86Search                ]        };
 
    key <I3B>        {        [ XF86New                ]        };
    key <I3C>        {        [ XF86Reply                ]        };
-    key <K62>        {        [ XF86MailForward        ]        };
-    key <K63>        {        [ XF86Send                ]        };
+    key <FK13>        {        [ XF86MailForward        ]        };
+    key <FK14>        {        [ XF86Send                ]        };
 
    key <I43>        {        [ XF86MyComputer        ]        };
    key <I44>        {        [ XF86Documents                ]        };

The current revision of the setkeycodes script to suit the above alternations to the logiaccess XKB model is:

Code:

#
# setkeycodes-logiaccess        Map unmapped scancodes to match logiaccess XKB
#                                as closely as possible.
#

KEY_MESSENGER[0]=e011                # Mapping to keycode 216 changes scancode to e040
KEY_MESSENGER[1]=216                # Reference to key in XKB is FK16 (121)
KEY_WEBCAM[0]=e012                # Mapping to keycode 152 left scancode unchanged
KEY_WEBCAM[1]=152

KEY_NEW[0]=e03b                        # Mapping to keycode 212 left scancode unchanged
KEY_NEW[1]=212
KEY_REPLY[0]=e03c                # Mapping to keycode 137 left scancode unchanged
KEY_REPLY[1]=137
KEY_FORWARD[0]=e03d                # Mapping to keycode 213 left scancode unchanged
KEY_FORWARD[1]=213                # Reference to key in XKB is FK13 (118)
KEY_SEND[0]=e03e                # Mapping to keycode 214 left scancode unchanged
KEY_SEND[1]=214                        # Reference to key in XKB is FK14 (119)

KEY_MYCOMPUTER[0]=e043                # Mapping to keycode 219 left scancode unchanged
KEY_MYCOMPUTER[1]=219
KEY_MYDOCUMENTS[0]=e044                # Mapping to keycode 220 left scancode unchanged
KEY_MYDOCUMENTS[1]=220
KEY_MYPICTURES[0]=e057                # Mapping to keycode 228 left scancode unchanged
KEY_MYPICTURES[1]=228
KEY_MYMUSIC[0]=e058                # Mapping to keycode 229 left scancode unchanged
KEY_MYMUSIC[1]=229

setkeycodes        ${KEY_MESSENGER[@]} ${KEY_WEBCAM[@]} \
                ${KEY_NEW[@]} ${KEY_REPLY[@]} ${KEY_FORWARD[@]} ${KEY_SEND[@]} \
                ${KEY_MYCOMPUTER[@]} ${KEY_MYDOCUMENTS[@]} ${KEY_MYPICTURES[@]} ${KEY_MYMUSIC[@]}

I now have that script placed in my /etc/rc.d/rc.local script under Mandrake 10.1.

fortezza 07-23-2005 11:24 AM

Logitech Cordless Keyboard on Fluxbox and Xorg
 
I am trying to setup my Logitech Cordless Keyboard so that they Multimedia keys actually do something. However, being on Fluxbox I don't have all of the mapping tools that Gnome/KDE have ( but I do have those WM/DM's installed ).

Any advice on getting the Volume Wheel working for PCM volume? I am not certain on what I want the other player keys to control, as I use XMMS/Mplayer a lot, so if I have to map pause/play or stop keys to a single app, I am not certain which one that will be.

Anyhow, currently the volume wheel moves my mouse pointer, lol, so any help in getting it to control the PCM volume ( not master volume ) , would be appreciated.


Thank You,

Fortezza

hazza 07-23-2005 10:41 PM

Re: Logitech Cordless Keyboard on Fluxbox and Xorg
 
Quote:

Originally posted by fortezza
I am trying to setup my Logitech Cordless Keyboard so that they Multimedia keys actually do something. However, being on Fluxbox I don't have all of the mapping tools that Gnome/KDE have ( but I do have those WM/DM's installed ).
There are several models of Logitech cordless keyboards. Some of these models already have support for the multimedia keys in XKB. What specific model of Logitech cordless keyboard do you have? A quick search on mapping keys in Fluxbox yielded some results in a HOWTO Use Multimedia Keys on the Gentoo Linux Wiki.

Quote:

Any advice on getting the Volume Wheel working for PCM volume? I am not certain on what I want the other player keys to control, as I use XMMS/Mplayer a lot, so if I have to map pause/play or stop keys to a single app, I am not certain which one that will be.

Anyhow, currently the volume wheel moves my mouse pointer, lol, so any help in getting it to control the PCM volume ( not master volume ) , would be appreciated.
Have you tried running xev from an xterm and checked whether there are any keys that don't generate key codes? You should also note any keys that generate key codes and already have key symbols mapped to them. In your particular case the HOWTO has information on using the volume keys but first you'll have to check that they're mapped to the right key symbols.

fortezza 07-29-2005 01:01 AM

I found the source of the problem. My usb KVM switch was changing the codes sent to the computer, and keeping the Media keys from being recognized by my workstation. I went ahead and disconnected it from the KVM and put it directly to my workstation, and Lineak can now be used to configure what the keys/volume wheel do. One interersting thing is that I have two displays set in separate display mode, and I have to open a console window and start the Lineak daemon for it to work in each one.

To clarify the problem this solves, if you start Lineakd in Display one, the volume wheel will only work if the active Window is in Display one. If you click on a window in Display two, the volume will no longer does anything. Starting up a Lineak instance in each display solves this problem.


All times are GMT -5. The time now is 06:41 PM.