Xmodmap: problems emulating multimedia keys

Using xmodmap I have remapped my Menu key to Mode_switch and used the modifier to emulate some multimedia keys, like this:
keycode 75 = F9 F9 XF86AudioPlay F9 F9 F9 XF86Switch_VT_9 F9 F9 XF86Switch_VT_9 F9 F9 F9 F9 XF86Switch_VT_9 F9 F9 F9 F9 XF86Switch_VT_9
keycode 76 = F10 F10 XF86AudioStop F10 F10 F10 XF86Switch_VT_10 F10 F10 XF86Switch_VT_10 F10 F10 F10 F10 XF86Switch_VT_10 F10 F10 F10 F10 XF86Switch_VT_10
keycode 95 = F11 F11 XF86AudioPrev F11 F11 F11 XF86Switch_VT_11 F11 F11 XF86Switch_VT_11 F11 F11 F11 F11 XF86Switch_VT_11 F11 F11 F11 F11 XF86Switch_VT_11
keycode 96 = F12 F12 XF86AudioNext F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 F12 F12 XF86Switch_VT_12
keycode 78 = Scroll_Lock NoSymbol XF86AudioLowerVolume NoSymbol Scroll_Lock Scroll_Lock
keycode 107 = Print Sys_Req XF86AudioMute Sys_Req Print Sys_Req Print Sys_Req
keycode 127 = Pause Break XF86AudioRaiseVolume Break Pause Break Pause Break
keycode 135 = Mode_switch
clear mod3
clear mod4
clear mod5
!add shift = Shift_L Shift_R
!add lock = Caps_Lock
!add control = Control_L Control_R
!add mod1 = Alt_L Meta_L Alt_R
!add mod2 = Num_Lock
add mod3 = Mode_switch
add mod4 = Super_L Hyper_L
add mod5 = ISO_Level3_Shift
Testing with xev, I see that the codes are sent correctly.
But in kde, only mute button works.
The other controls, like volume up/down, etc, are ignored.
My intention was to emulate the behavior of Fn + various keys from laptops and keyboards with similar functionality.
Any thoughts what is wrong? I searched a lot of info and didn't find any clues.

Yeah, I forgot to mention, when I try to set a new custom shortcut, and I press first Menu, it doesn't wait for the next key and I the label changes to unprintable characters.

Similar Messages

  • Disable handling multimedia keys by Xserver

    Hi there,
    i've got problem with multimedia keys. Yes, i want disable it. Earlier(some time ago) i had my own handling scripts in acpi, that were using acpi_fakekey known from debian/ubuntu, to generate key action in Xserver. Some day, i have seen, that keys behave like be double pushed, so i disabled my scripts and everything was ok until, i've decided to use mpd to play music, and now i want to execute mpc client to play/pause directly from acpi by scripts. I hope i wrote it so You can understand me... Question is how to disable asus extra buttons
    From Xorg.log
    (**) Asus Laptop extra buttons: always reports core events
    (**) Asus Laptop extra buttons: Device: "/dev/input/event2"
    (II) Asus Laptop extra buttons: Found 1 mouse buttons
    (II) Asus Laptop extra buttons: Found keys
    (II) Asus Laptop extra buttons: Configuring as keyboard
    (**) Asus Laptop extra buttons: YAxisMapping: buttons 4 and 5
    (**) Asus Laptop extra buttons: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) XINPUT: Adding extended input device "Asus Laptop extra buttons" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) Option "xkb_model" "evdev"
    (**) Option "xkb_layout" "pl"
    All input device handled by hal.
    I think i should somehow disable device in hal(by some tricky conf in /etc/hal/fdi/policy/file.fdi) or disable this device to Xserver.
    Please help.

    Ok, I've taken a look at 'System Settings -> Input actions' and there is nothing in there that relates to multimedia keys. The only actions configured are the default Konqueror gestures and printscreen. Is that a problem? Should I set the inputs there? Should the config from .Xmodmap not supercede any KDE configuration? If not, how should I configure calls like 'XF86AudioStop', etc. that are software independent in the KDE input mapper?
    Sorry about all those questions, btw.

  • Font rendering issue & multimedia keys not working

    Hi, yesterday i switched to KDEmod 4.1 and I have two major problems...
    One is font rendering issue... I did not change anything in my font-related packages (cairo, freetype, fontconfig, libxft) and i have to add that this setup worked perfectly in KDEmod 3.5.9, but now it looks like this:
    This bug occurs only in qt apps and mostly in kmenu... i.e firefox renders my fonts flawlessly...
    Second problem are multimedia keys on my keyboard...
    They worked in KDE 3.5.9, but now I cannot set them up properly... Sometimes they work, sometimes they don't...
    KDE recognizes the pressed key, but when I assign specific action and press the key, just nothing happens...

    You might be able to solve your font issue by going to System Settings -> Appearance -> Fonts.  I enable ant-aliasing.  I also clicked on configure and select "Use sub-pixel rendering" to RGB and the hinting style to Full.  I also use the Force fonts DPI to 96 DPI.  This makes the fonts pleasing to my eyes.
    This is how I got my multimedia keys to work in KDE4.1:
    Go to System Settings -> Regional and Language and make sure to set the County or region to your location.
    khotkeys needs to be running.  I added it to the autostarted progam list. System Settings -> Advanced tab -> Autostart
    When I got the multimedia keys working, I was really tring to get the keyboard shortcuts to work.  In addition to the above steps, I also deleted
    ~/.kde4/share/config/kglobalshortcutsrc.  I do not know if deleting this file is needed to get the multimedia keys working, but it was to get the keyboard shortcuts woring.
    Restart X
    Go to  System Settings -> Keyboard and Mouse -> Keyboard Shortcuts
    I set the volume control in the KMix component section.
    To get the keyboard shortcuts to work, go to the menu editor and select the program you want to create a shortcuts for.  Click on the advanced tab and create the shortcut in the shortcut field.  Save.
    Then go to  System Settings -> Keyboard and Mouse -> Keyboard Shortcuts. Change the component to KHotkeys.  Select the Program and then select the default shortcut that you just created.  (This works for the multimedia keys aswell).
    Hope this helps,
    pudge

  • Multimedia key issue in a terminal emulator

    My keyboard has a few multimedia keys(XF86AudioRaiseVolume, etc.) and
    they have been correctly recognized by X and have keycodes/keysyms. I
    can get them work on most programs, but they are not recognized by
    programs run inside a terminal emulator(urxvt or xterm, for example).
    Specifically, I want to control my emms playlist via
    XF86AudioPrev/XF86AudioNext. I have the key bindings in emacs start up
    file and it actually works when emacs appears as a standalone X
    window. But it fails when emacs is inside a terminal. it appears to
    me that the terminal/shell never delivers these key strokes to any
    processes spawned by them.
    I searched for the keysym/keymap resources in urxvt/xterm but can't
    quite catch the idea and don't even know if this helps.
    Last edited by eirika (2009-09-15 02:50:23)

    Response marked with
    line 1 16
    modem InOut
    it says that, "line 2 does not support modem control"
    - can you please try only one line at a time, that is:
    line 1
    modem inout
    then try line 2 and so on and see if we see errors for specific lines only (which we can investigate further)
    Then I typed:
    (config)#line 0 17
    (config-line)#modem InOut
    it says, "line 0 does not support modem control. Now it doesn't talk about line 2, instead it says that line 0 does not support modem control.
    This error is ok since line 0 is console and does not support modem control, mind you IOS spills out errors one after another so probably would have given error for line 2 next.
    In here, the main problem is that, when I type:
    (config)#line 1 16
    (config-line)#no exec
    and when I telnet, the router doesn't even prompt for anything. But when I again say, "exec" in line mode, then the router prompts me for the username.
    Do you mean reverse telnet out of these lines? Not sure I understand what you are trying to do here.
    A few things to check:
    1. Is the router completely up, means its not in boot mode etc.
    2. Are the IOS images different or same on the working vs non working 2511?
    Thanks, Mak

  • USB Keyboard Multimedia keys ; two input devices for one keyboard.

    Hi. I can't get my multimedia keys to work (Microsoft Wireless Laser Desktop USB keyboard). They don't show up in dmesg, xev, or the command line scan code program at all, even though the standard keys show as usual.
    One peculiarity is that the keyboard appears to be mapped to two devices /dev/input/event3 (the standard keys) and /dev/input/event4 (the multimedia keys) ; is there a way to "merge" the two inputs ? Is it a kernel problem ?
    TIA, Paul

    I solved my problem :-)
    Keyboard creates two event devices:
    lrwxrwxrwx 1 root root 9 lip 17 12:57 pci-0000:00:1a.1-usb-0:1:1.0-event-kbd -> ../event1
    lrwxrwxrwx 1 root root 9 lip 17 12:57 pci-0000:00:1a.1-usb-0:1:1.1-event- -> ../event2
    I had only first of it configured in xorg.conf (normal keys). I configured second device as below  (Identifier  "Multimedia keys"):
    # Core keyboard's InputDevice section
    Section "InputDevice"
    Identifier "Logitech Media Keyboard 600"
    Driver "evdev"
    Option "Device" "/dev/input/by-id/usb-Logitech_Logitech_USB_Keyboard-event-kbd" # it is my event1
    Option "XkbModel" "evdev"
    Option "XkbLayout" "pl"
    Option "evBits" "+1"
    Option "keyBits" "~1-255 ~352-511"
    Option "Pass" "3"
    EndSection
    Section "InputDevice"
    Identifier "Multimedia keys"
    Driver "evdev"
    Option "Device" "/dev/input/by-path/pci-0000:00:1a.1-usb-0:1:1.1-event-" # it is my event2
    Option "XkbModel" "evdev"
    Option "Protocol" "evdev"
    EndSection
    In Serverlayout I added entry for  InputDevice  "Multimedia keys":
    Section "ServerLayout"
    Identifier "Dual Head"
    InputDevice "Logitech MX620" "CorePointer"
    InputDevice "Logitech Media keyboard 600" "CoreKeyboard"
    InputDevice "Multimedia keys" "SendCoreEvents"
    Screen "Desktop"
    EndSection
    And almost all multimedia keys started to work.
    I had small problems with couple of keys which created keycodes greater than 255. I used keyfuzz to remap these keycodes to something smaller than 255.
    After that i scaned all keycodes with xev, and mapped them to keysymlinks with xmodmap.
    Now all media keys are working and I can configure KDE to use it.

  • Map multimedia keys to characters?

    I've got five multimedia keys on the edge of my keyboard and they are aligned just properly to be used as input in Frets On Fire Game doesn't recognize those keys though, so I was wondering is there a way to make the multimedia keys to generate for example characters a, b, c, d and e? Then they should work in the game?

    Ok, thanks I got all them but one working. Four of these keys return keycodes: 129, 144, 153 and 162. They are also recognized by xev. But one of them doesn't print anything in xev. I tried with "showkey -k" and it told me that the keycode is 410. Even though I mapped that keycode with xmodmap it doesn't print anything. All the other multimedia keys now print characters. What's the problem?
    edit: It seems that xorg doesn't like keycodes above 255. So I have to somehow map that one button to generate keycode below 255. I could probably do it with setkeycodes? Problem is that I've got no idea what the scan code of that button is, because it doesn't show up anywhere. "showkey -k" shows 410 and "showkey -s" shows nothing (for other key it shows the scan code normally). Weird...
    Last edited by mikoro (2008-01-20 13:34:27)

  • What application do you use for extra/multimedia keys on the keyboard?

    Just curious on what applications there are available for all these extra keys manufacturers keep placing on keyboards, thankfully my keyboard only has a few extra and they aren't in the way. I've been using LinEAK for a while now but it doesn't seem to be maintained any more so I was wondering if there are any better alternatives.

    [vEX] wrote:
    con wrote:I use Xmodmap to get the keys to work...then just assign them actions throuhg the global shortcuts in applications
    If youre not gettign any codes, dmesg or xev, turn of the computer switch to the PS/2 port youre using USB to connect the keyboard, USB hid driver hasnt got the functionality to give those extra keys scancodes and the devs dont seem willing to do anything about it...
    Follow the wiki hotkyes instructions and you cant go wrong, someone posted link to them earlier.
    Not wanting to sound rude, but if you had even bothered to read the thread you would have seen that the keys are working fine with xbindkeys, it's the process of autostarting xbindkeys with openbox that doesn't work.
    However, I've now started using the built in keybind function in openbox, though for some reason I can't execute mpc commands (ie: mpc stop), it just won't work. Instead I have to use Sonata (ie: sonata stop), could the reason be that mpc outputs info while Sonata does not when you use those commands?
    EDIT: It wasn't, I added the --no-status switch but it still won't work with mpc.
    Actually i read every post in this thread before posting, sorry if came of sounding mean (sv:elak) or something. Thought you just wanted to know what apps ppl were using to get multimedia keys to work (alot of ppl seem to be having problems with this), didnt realize that you wanted help. Maybe choose a better title if you dont want too confuse ppl like me. Again sorry:)

  • Multimedia keys are non-functional

    I'm currently experiencing a problem with the multimedia keys on the Apple Pro (white) keyboard. The expose keys work; however the brightness, volume up, volume down, mute, and eject keys will not. The said keys will work for a few seconds as OS X is loading up and mounting the drives, but they stop working once the drives are mounted. Right now, I'm using the menu bar eject button. When I click the "Keyboard/Mouse" preferences in the System Settings, I get a perpetual spinning beach ball and I'm forced to restart the computer using the power button. I've tried all of the following without any success:
    * replaced existing Apple Pro Keyboard with another of the same
    * CommandOption+OR
    * CommandOption+PR
    * plugged keyboard & mouse into different USB ports
    I've had this computer 4+ years and this is a first. I would greatly appreciate any additional suggestions.
    Thanks.

    Hi Nick, and a warm welcome to the forums!
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc that came with your computer, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it finishes.
    The usual reason why updates fail or mess things up, or things don't load/run, is if Permissions are not fixed before & after every update, with a reboot... you may get a partial update when the installer finds it doesn't have Permissions to change one obscure little part of the OS, leaving you with a mix of OS versions.
    Some people get away without Repairing Permissions for years, some for only days.
    If Permissions are wrong before applying an update, you could get mixed OS versions, if Directory is the slightest messed up, who knows!
    If many Permission are repaired, or any Directory errors are found, you may need to re-apply some the latest/biggest updates again, or even do an A&I if you have enough free disk space.
    The combo update for PowerPC-based Macs...
    http://www.apple.com/support/downloads/macosx10411comboupdateppc.html
    The combo update for Intel-based Macs...
    http://www.apple.com/support/downloads/macosx10411comboupdateintel.html
    Repair Permissions after re-install, then reboot again.
    If all the above do not resolve the problem, then it's time for an Archive & Install, which gives you a new OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space...
    http://docs.info.apple.com/article.html?artnum=107120

  • N70 Multimedia Key

    Hi everyone
    i used to set the program MSDICT Viewer for my N70 Multimedia Key, before i upgrade the phone's firmware from v 3.*** (i don't remember! ) to 5.0638.3.0.1. but now i can't set it up any more! MSDICT viewr is not available in the program list of Multimedia Key. surprisingly it is available for other keys as i go to tools\settings\phone\standby mode. what is the problem with the multimedia key? why it doesn't show all the programs installed in the phone?
    i reinstalled MSDICT but again it didn't work.
    any suggestions appreciated.
    thanks.
    Ali

    but nj7_, what do you mean "the Rules have been changed"? it is supposed to work with all programs. you know, one of the greatest advantages to such functional key is to execute any program while you are working somewhere else. what a pity! it was really really useful before.

  • ITunes 7.1.1 only partially fixes multimedia keys

    Well... after all the hassle we had before; http://discussions.apple.com/thread.jspa?threadID=881133
    It appears that iTunes developers have adressed part of the problem with the multimedia keys in 7.1.1. Now the play/pause, stop, forward, and reverse buttons work well, even when iTunes is minimized to the systray.
    However, the volume buttons are still hosed. Whenever iTunes isn't the "top window", or window in focus and I press mute it still mutes the system, then quickly unmutes it again. The same for pressing the up and down volume. When iTunes is in focus it will only increase the volume by 1 notch. When iTunes isn't in focus it increases or decreases the volume by two notches.
    What would really be nice is if there were a checkbox in the preferences section to completely disable iTunes multimedia key support.
    Still a bad day for me, so I'm going back to 7.02 again.
    Dell inspiron 8500   Windows XP  

    WOOOOHOOOO!!!!! I Finally found a way to fix this issue! After playing around with the iTunesKeyboardCompatibility.dll a while I think I got it working again for me.
    Here's the situation. Most of you know that if you remove the iTunesKeyboardCompatibility.dll the program will just recreate it when you try to launch iTunes again.
    Some of you know that if you delete the iTunesKeyboardCompatibility.dll and recreate an empty file with the same name iTunes will complain that it's not a valid windoze file... ya ya ya... whatever.
    SO this gets me to thinking.... the mmkeys.dll is a valid windoze dll file. What would happen if we took the mmkeys.dll and renamed it to iTunesKeyboardCompatibility.dll?
    Alas.... SUCCESS!!!! At least for me on my machine. I can't speak for anyone else. Hope this helps guys.
    Dell inspiron 8500 Windows XP

  • Sonata and Multimedia Keys (Gnome)

    I've just started using sonata again (was using amarok) and I can't make my multimedia keys work properly with it It was supposed to be fixed a few versions ago but with 1.5.1, 1.5.2 and SVN I can't make it work. However If I go into keyboard shortcuts and set the keys again it all works perfectly but I have to do it again every time I restart my computer. Anyone else got this problem?

    @tacticalbread: thanks for the config, but that didn't solve the issue.
    @invalidArgument597: no, I've tried both, still nothing.
    EDIT: Ok, it's solved now.  I commented out the lines right before the XF86 bindings and it automagically started working.  I guess the lines before XF86 bindings were somehow problematic!
    These are the lines that I commented out/removed:
    rodentbane.bind({ modkey, "Control" }, "m", function() rodentbane.stop() end),
    -- move mouse to bottom-right corner because it's just annoying!
    awful.key({ modkey, "Control", "Shift" }, "m", function() move_mouse_out() end),
    mod+ctrl+m was already assigned to rodentbane previously, so maybe reassigning it was the problem.
    Thanks for the help!
    Last edited by amoradi (2011-07-09 06:43:54)

  • G500 - switch functionality of Multimedia keys with F1-F12?

    Hi all.
    I have just bought the G500 and I'm getting really annoyed by the keyboard. 
    It has "great" multimedia keys as the main keys instead of usual F1-F12 keys. To access their functionality you must press Fn+appropriate key. The problem has been described here many times. But no solution works for G500.
    I have tried: 
    enter BIOS (no such option for keyboard)
    install Lenovo Slim USB Keyboard application (runs, but the option selected have no effect)
    install Lenovo Ultraslim Plus Wireless Keyboard & Mouse Driver application (do not run at all - just brings me to the desktop and do nothing)
    I'm wondering if someone experience such problems too, and if there is some solution. I'm not able to use the computer since I use a lot of application depending on the functional keys and if there is no solution I will have to buy another computer, and it would not be Lenovo anymore as this really disappointed me:-(.
    Btw: does anyone at all really like new keyboard?
    Thanks,
    Michal Linhart
    Solved!
    Go to Solution.

    hi Zoka17,
    You concern might be similar to this thread
        http://forums.lenovo.com/t5/IdeaPad-Y-U-V-Z-and-P-series/How-do-I-invert-the-F-keys-and-the-Fn-keys-...
    If you don't have the setting in the BIOS under Configuration TAB named "Hotkey"
    then I'm afraid on that thread they had to use a Software to remap few of the FN keys and reverse it.
     I'm not sure how or if this will help, but give it a try,
    Best regards
    Solid Cruver
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • N80 - V 4.0707.0.7 - Unconfigurable multimedia key

    Hi Folks,
    I'm documenting this problem seperately here.
    ====================
    Environment:
    N80 with firmware V 4.0707.0.7
    Problem:
    After upgrading N80 to V 4.0707.0.7, the item "Multimedia key" is no longer selectable under menu "Multim. key".
    Note:
    1. The item "Multimedia key" under menu "Multim. key" is used to configure the short-cut assigned to the multimedia key. This short-cut is activated by pressing and holding down on the multimedia key.
    2. Menu "Multim. key" can be accessed via the following steps:
    a. Press "multimedia key",
    b. Press "scroll down".
    3. Details can be obtained from the Help within N80 under the topic "Multimedia key"
    Finding:
    1. The item "Multimedia key" under menu "Multim. key" can be "re-enabled" by restoring a phone memory backup of a previous firmware.
    2. The short-cut had been defaulted to "Music player".
    Action:
    A call had been logged to Nokia Careline under case 2-160630370.
    This case had been escalated to the developments as of yesterday 19:02 GMT+8.
    ====================
    Folks, do log a call to NCL if you want this problem to be solved at an earlier date. You may want to quote my case number. An ex-mod once told me that the more calls logged for a problem, the higher the problem's priority.
    Cheers and good luck. ^_^

    BTW Folks,
    Alb3530 was the one who identified the problem and solution. Don't wanna take credit. He's the man.
    Only thing I did was logging a call to NCL.
    Cheers. ^_^

  • N73 - Cannot send text messages/Multimedia key not...

    Sent my N73 into the shop to be fixed, and it came back with 2 problems. I cannot send text messages at all. I have heard that this can be solved with the sms accelerator, but I can find NO download link for the N73. I found another one and installed it onto my phone (version 1.0(0)) but the problem persists. ANy ideas or links to where the sms accelerator is for the N73?
    The 2nd problem is the multimedia key is no longer programmable. I press the multimedia key, then select the down arrow (configure) I scroll down to any of the options right, left, top, center, bottom. When I press the center joystick I just am taken back to the multimedia screen. I am not given any choices to reprogram the keys....any ideas there???
    Thanks for the help!
    -Sam
    Solved!
    Go to Solution.

    Often it's just a case of resetting the phone after it comes back from repairs if they've upgraded or simply reflashed the firmware for you.
    Note that these operations will wipe your phone's internal memory so do a backup before proceeding.
    First option: revert to factory defaults. Dial *#7780#.
    Second option: soft reset. Dial *#7370#.
    Third option: hard reset. Switch the phone off and do the following.
    1) Press and hold the green "call", "3" and "*" buttons.
    2) With those buttons pressed down, switch the phone on.
    3) Keep pressing those 3 buttons and only release them once the phone shows signs of life such as the Nokia "hands" logo or the language selection screen.
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

  • ATunes Multimedia Keys

    I am using aTunes compiled from the AUR. Unfortunately, contrary to what is says on the aTunes wiki, the multimedia keys are not working. If anyone knows why this is, please help me out. Other than this little problem aTunes is my favorite music player in Windows, Mac, or Linux.

    Remove the Toshiba Controls, reboot the notebook and reinstall the common modules and Toshiba controls.
    Hopefully you are successful
    PS: You could use an registry cleaner application like CCleaner after removing of the Toshiba software to clean the corrupted registry.

Maybe you are looking for