aru Posted January 13, 2003 Report Share Posted January 13, 2003 static Moderator Joined: 16 Apr 2002 Posts: 313 Location: Canada Posted: Thu Apr 25, 2002 1:19 pm Post subject: Setting up Mutimedia Keyboard Keys _________________________________________________________________ This courtesy of bradenm, edited by static For those of you who have newer keyboards with the special "multimedia" keys on top, here is how to get them working: First run xev(*see below) from the command line. (make sure that you focus on the window that comes up) Now press each mutimedia key that you have one at a time, and write down the keycode that comes up on the screen. Quote: KeyPress event, serial 26, synthetic NO, window 0x3000001, root 0x78, subw 0x0, time 1103834353, (106,671), root:(858,691), state 0x10, keycode 229 (keysym 0, 0), same_screen YES, XLookupString gives 0 characters: "" Next place text file (called something like "mmkeys") in your favorite window manager's autostart directory, e.g. ~/.kde/Autostart), make sure it is executable, and add the following lines: Code: #!/bin/bash xmodmap -e 'keycode xxx=F14' xmodmap -e 'keycode xxx=F15' xmodmap -e 'keycode xxx=F16' xmodmap -e 'keycode xxx=F17' xmodmap -e 'keycode xxx=F18' xmodmap -e 'keycode xxx=F19' xmodmap -e 'keycode xxx=F20' xmodmap -e 'keycode xxx=F21' xmodmap -e 'keycode xxx=F22' xmodmap -e 'keycode xxx=F23' (i.e. map each keycode to a function button above F13) Then open kmenuedit, or similar, select the program you want to run, choose "custom key" in the shortcut keys section, then press the multimedia key that you want to use for that app. e.g. choose konqueror, click custom key, and press your "internet" button. Save your changes, log out and in, and voila! your multimedia keys are working like a charm. Here are some apps I use: Mail: kmail --check Internet: kfmclient openProfile webbrowsing Search: mozilla Sleep: xset dpms force standby Calculator: kcalc *If you get a 'command not found' when you try to run xev, install "X11R6-contrib" - if an rpmdrake search doesn't bring any results, check "search by file" and/or "search by description". In this case, you had to search by file. Extra thanks to bradenm for this. bradenm Frequent user Joined: 01 May 2002 Posts: 69 Location: Kelowna, BC, Canada Posted: Thu May 02, 2002 2:47 am Post subject: Sound Adjustments _________________________________________________________________ I figured out how to adjust the volume! Here are the commands: Vol Up: aumix -v+10 Vol Down: aumix -v-10 Tada! note: You may need to install aumix (on your cd's) for this to work. Doggy Frequent user Joined: 03 May 2002 Posts: 33 Location: Aberdeen UK Posted: Mon May 06, 2002 8:12 pm Post subject: _________________________________________________________________ Thanks for this - works great. The only thing I have been unsure on is getting the screenlock to activate from a multimedia button. I always used to just use xlock, but I can't find that anymore. I generally run kde, so getting one of the .kss screensavers to run would be good but when I execute them (eg. krozat.kss), they just run in a window. Any ideas? Cheers, Doggy bradenm Frequent user Joined: 01 May 2002 Posts: 69 Location: Kelowna, BC, Canada Posted: Mon May 06, 2002 8:55 pm Post subject: Use DCOP _________________________________________________________________ Locking screen & running a screensaver is easy - using DCOP. Here are the commands: Lock Screen: dcop kdesktop KScreensaverIface lock Screensaver: dcop kdesktop KScreensaverIface save There are more commands available - run kdcop for a complete list. Mystified Senior user Joined: 01 May 2002 Posts: 628 Posted: Thu May 09, 2002 2:40 pm Post subject: _________________________________________________________________ I still can't get mine to work. It doesn't do anything when I press any of my keys. The little window pops up but the only thing it recognizes is the motion of the mouse. I even found this article which is about HP Multimedia keyboards which is what I have but it didn't help with my problem.. I keep wondering if there's something else that needs to be configured differently on my system. static Moderator Joined: 16 Apr 2002 Posts: 313 Location: Canada Posted: Thu May 23, 2002 8:32 pm Post subject: UPDATE _________________________________________________________________ OK! I've written my own keycode mapper - no longer do the masses need xev! It's a pretty little X program that you just click exit when done! Don't even need to run it from a console - the output goes straight to the window! E-mail me for a copy! Licenced under the GPL, of course! frew Senior user Joined: 01 Jun 2002 Posts: 214 Location: Mississippi Posted: Mon Jun 10, 2002 8:57 pm Post subject: _________________________________________________________________ that keycode mapper static wrote works great. I would suggest it to anyone who wants to use a kb like this. Nice static! static Moderator Joined: 16 Apr 2002 Posts: 313 Location: Canada Posted: Tue Jun 11, 2002 3:48 am Post subject: _________________________________________________________________ <bows very low> thank you for your kind words! Someday, when I'm better at X windows programming, I'll have it binding the keys right within the program! Choose the action, press the multimedia key, click next. bradenm Frequent user Joined: 01 May 2002 Posts: 69 Location: Kelowna, BC, Canada Posted: Wed Jun 12, 2002 3:48 am Post subject: _________________________________________________________________ Hey guys, check this out! This is AWSOME! Cloim Newbie Joined: 16 Jun 2002 Posts: 3 Posted: Sun Jun 16, 2002 7:23 pm Post subject: _________________________________________________________________ On the script file, how do I 'Make sure it is executable' ? I can run the script in a console ('bash mmkeys') and it works, but haven't been able to get it to autorun. On volume adjustments: KDE shows background activity for aumix long after it's done it's thing.Wouldn't bother me except it slows down and/or prevents additional adjustments. If I have it run from a console things improve but I get a console flash in and out when it runs. Can that be prevented? I tried the LinEAK prog, it opens and runs a new aumix every time I hit the volume key. spider Frequent user Joined: 21 Jul 2002 Posts: 65 Posted: Thu Aug 01, 2002 9:33 am Post subject: Re: Use DCOP _________________________________________________________________ bradenm wrote: There are more commands available - run kdcop for a complete list. In order to tie a keyboard shortcut to the "show desktop" button first in the kicker, I digged the list again and again without any achievement. And I can NOT find any useful information at google. I even look into the source of CVS version, and I find nothing of how to use dcop to show desktop. (And to my surprise, in kmenuedit, I can't specify a key to "show desktop" either) Could you give me some clues? Thanks syouth333 Newbie Joined: 09 Jul 2002 Posts: 4 Posted: Mon Aug 12, 2002 2:12 pm Post subject: _________________________________________________________________ does anybody know what to do with an IBM media access pro keyboard some of the multimedia buttons along the top dont work. how do i get the keycode for a button that isnt read? spider Frequent user Joined: 21 Jul 2002 Posts: 65 Posted: Mon Aug 12, 2002 3:57 pm Post subject: _________________________________________________________________ I find a ultimate way to make most of my keyboards try xbindkeys, and I just write a GUI frontend to config it on the fly,but it under development also there is another GUI frontend, named as xbindkeys_conf. The program I am working on is a bitter powerful than it. If you want a try, I will send you. DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Posted: Wed Sep 04, 2002 6:19 pm Post subject: _________________________________________________________________ Well, I got a new keyboard today. Has 23 keys... I found out that you can't map to over F35... Don't know why. Anyhow, I had to start at F13 and go all the way to F35... Heh. Xev is cool, so is bbkeys and xmodmap! spider Frequent user Joined: 21 Jul 2002 Posts: 65 Posted: Sun Sep 08, 2002 7:45 am Post subject: _________________________________________________________________ Xev ? But it seems it does not exist in my mandrake box. Where do you get it? DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Posted: Sun Sep 08, 2002 7:53 am Post subject: _________________________________________________________________ Code: urpmi xev [/i] [color=red] [b]bvc81[/b] Eric Joined: 04 Jun 2002 Posts: 1014 Location: Houston, Texas Posted: Sun Sep 08, 2002 3:00 pm Post subject: _________________________________________________________________ [/color] xev is part of the X11R6-contrib-x.x.x-xmdk.i586.rpm [color=red] [b]DOlson[/b] Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Posted: Sun Sep 08, 2002 8:09 pm Post subject: _________________________________________________________________ [/color] heh... Same thing. urpmf xev Then install the result. [i][b]Editor's note:[/b] This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).[/i] Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted May 16, 2003 Report Share Posted May 16, 2003 I don't know if I should post my question here or start a new thread in software, so I'll post it here (the lesser of two evils). I'm trying to use xbindkeys to set my multimedia keys. I have them all configured like I want except for one small problem. I set my mail key to run Sylpheed and it works. The problem is if I click on the desktop (even on an icon), it also opens Sylpheed, which is annoying. Is there anyway to stop this? I have a Microsoft Natural Multimedia keyboard. xev tells me that the Mail key is KeyRelease event, serial 28, synthetic NO, window 0x1800001, root 0x81, subw 0x0, time 795593176, (166,-10), root:(194,56), state 0x10, keycode 236 (keysym 0x0, NoSymbol), same_screen YES, XLookupString gives 0 characters: "" and my .xbindkeysrc file section for that looks like this: #Mail "sylpheed" m:0x10 + c:236 Mod2 + NoSymbol I used xbindkeys_config to set it up and used the 'Get key' function. My mouse is a PS/2 Microsoft Optical Scroll mouse. Is it the MS equipment? lol I also figured out I have to start xbindkeys in ~/.bash_profile or they wouldn't work [Edit]: An even weirder twist -> If I use the Mail button while the desktop is obscured by an open window (Netscape for example), then clicking the mouse on the desktop does NOT open Sylpheed thereafter. But, if I click the Mail button at anytime without the desktop obscured, then clicking on the desktop with the mouse opens Sylpheed. Guess I could only click the Mail button with the desktop obscured...LOL. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.