LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-11-2004, 12:59 PM   #1
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Rep: Reputation: 30
Program for keybinding of Multimedia buttons on keyboard


Somebody got such kind of program for Linux?

Or can I just modify that in the X86Config?
You see, I have multimedia buttons at the top of my keyboard and I want to let them be supported by my PC , but I don't know how :s

So isn't there a program that checks the given key, if it equals (for example) 0x0B78 , then it should do execute 'xmms -r'

Greetz,
AliTriX
 
Old 02-11-2004, 01:06 PM   #2
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
check out Xmodmap and xev
I've been contemplating this as well, since I've got a logitech internet/multimedia keyboard with 10 currently useless buttons, but haven't done any reseach yet.
 
Old 02-11-2004, 03:13 PM   #3
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
Problems

I did this:
Code:
xmodmap -e "keycode 153 = Next"

---- then ----

xev tells me this, when I push the button 153 (next number, for audio)

KeyPress event, serial 24, synthetic NO, window 0x2600001,
    root 0x3a, subw 0x0, time 24601209, (474,197), root:(509,265),
    state 0x10, keycode 153 (keysym 0xff56, Next), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 24, synthetic NO, window 0x2600001,
    root 0x3a, subw 0x0, time 24601350, (474,197), root:(509,265),
    state 0x10, keycode 153 (keysym 0xff56, Next), same_screen YES,
    XLookupString gives 0 bytes:  ""


--- then ----

dbzgt@AliTriX:~$ xmodmap -pk | grep 153
    153         0xff56 (Next)   

--- modify .fluxbox/keys ---

dbzgt@AliTriX:~$ cat .fluxbox/keys | grep Next
Mod1 Tab :NextWindow
None Next :ExecCommand xmms -f
I restart fluxbox, thought that maybe help, but still not working

Somebody knows why?
 
Old 02-11-2004, 03:16 PM   #4
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
Aaah.. shit :S

The key 'Page Down' became that execute, shit!! :'(
Can somebody tell me how I can get my PageDown back again :s?
 
Old 02-11-2004, 03:42 PM   #5
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
I'm going to guess that "next" is a preset used by page down

You can most likely undo this by removing the line from .fluxbox/keys

I did some messing around and got it working with my Logitech keyboard.
You know how to find the keycode already, so I won't go into that.

locate XKeysymDB
will tell you where the keysym list is...this is a list Linux uses for your keysym names. Istead of using "Next", pick one of those for your key name. Here's what I have in my .Xmodmap:
Code:
!! Testing the Logitech extra keys
!! User
keycode 223 = XF86Start
!! Email
keycode 236 = XF86Mail
!! Messenger-SMS
keycode 145 = XF86Messenger
!! Webcam
keycode 146 = XF86WebCam
!! Mute
keycode 160 = XF86AudioMute
!! Volume +
keycode 176 = XF86AudioRaiseVolume
!! Volume -
keycode 174 = XF86AudioLowerVolume
!! Media
keycode 237 = XF86Music
!! My Home
keycode 178 = XF86Documents
!! Search
keycode 229 = XF86Search
I put "None XF86Music :ExecCommand xmms" in .fluxbox/keys, restarted the X server, and my "Media" button now launches xmms
I don't know how I'm going to set up the volume/mute buttons yet, but it'll happen...
 
Old 02-11-2004, 04:01 PM   #6
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
Quote:
You can most likely undo this by removing the line from .fluxbox/keys
I noticed that already

And the for the tip man! It works
This is what I have atm:
Code:
~/.fluxbox/keys
None XF86AudioPrev :ExecCommand xmms -r
None XF86AudioPause:ExecCommand xmms -t
None XF86AudioPlay :ExecCommand xmms -t
None XF86AudioStop :ExecCommand xmms -s
Code:
Response xmodmap -pk | grep Audio
    144         0x1008ff16 (XF86AudioPrev)      
    153         0x1008ff17 (XF86AudioNext)      
    162         0x1008ff14 (XF86AudioPlay)      
    164         0x1008ff15 (XF86AudioStop)
 
Old 02-11-2004, 04:24 PM   #7
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
Btw, found a solution for you, for the mute and volume (+/-) keys

Code:
 ~/.fluxbox/keys/
None XF86AudioMute :ExecCommand rexima vol 0
None XF86AudioRaiseVolume :ExecCommand rexima vol +5
None XF86AudioLowerVolume :ExecCommand rexima vol -5
(I only don't know how unmute, so I get the volume I was )

Good luck with it!

Greetz,
AliTriX

Last edited by alitrix; 02-11-2004 at 04:28 PM.
 
Old 02-11-2004, 04:32 PM   #8
Kujila
Member
 
Registered: Jan 2004
Location: United States
Distribution: Mandrake 9.2
Posts: 158

Rep: Reputation: 30
Hmm, I found some interesting information here:

http://krath.dk/linux/chicony/

http://krath.dk/linux/chicony/

Hope this can help you guys, and I alike!
 
Old 02-11-2004, 05:12 PM   #9
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Quote:
Originally posted by alitrix
Btw, found a solution for you, for the mute and volume (+/-) keys

Code:
 ~/.fluxbox/keys/
None XF86AudioMute :ExecCommand rexima vol 0
None XF86AudioRaiseVolume :ExecCommand rexima vol +5
None XF86AudioLowerVolume :ExecCommand rexima vol -5
(I only don't know how unmute, so I get the volume I was )

Good luck with it!

Greetz,
AliTriX
I'm using Alsa, so I don't know if that would work. I found something in amixer that works anyway:
None XF86AudioMute :ExecCommand amixer -q set Master toggle # mute toggle
None XF86AudioRaiseVolume :ExecCommand amixer -q set Master 1+
None XF86AudioLowerVolume :ExecCommand amixer -q set Master 1-
 
Old 02-11-2004, 05:18 PM   #10
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
Yes, aumix can do it as well
Except I don't know how it works and I don't have it on my pc, I only had rexima (Slackware 9.0)

Greetz,
AliTriX
 
Old 02-11-2004, 07:29 PM   #11
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Thanks for the nudge into something I've been meaning to check out for months...I've learned a bit, and I discovered I don't have to download and install a 5mb application to get full use out of my keyboard. And on top of that, I can customize it in ways I couldn't with the Windows Logitech software.
 
Old 02-11-2004, 09:11 PM   #12
dave_blob
Member
 
Registered: Nov 2003
Distribution: Slackware 9.1
Posts: 41

Rep: Reputation: 15
if you want an easy way, and your running gnome, theres a little app called 'acme' which can setup all these keys for you
 
Old 02-11-2004, 10:35 PM   #13
charliecron
LQ Newbie
 
Registered: Nov 2003
Posts: 8

Rep: Reputation: 0
Use xhkeys

http://freshmeat.net/projects/xhekys/
 
Old 02-12-2004, 01:10 AM   #14
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Nothing beats a nice, clean, text file.
 
Old 02-12-2004, 07:32 AM   #15
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by mikshaw
Nothing beats a nice, clean, text file.
I full agree with you
I just love to custom it on my own why, without any programs
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enable multimedia buttons? kornerr Linux - General 8 02-14-2006 03:18 AM
multimedia buttons v1pEr Linux - Laptop and Netbook 5 03-10-2005 11:24 AM
Looking for a program for my multimedia keyboard setlec_seta Mandriva 0 10-29-2004 08:15 AM
HI, I have a problem with the multimedia buttons in my keyboard... SpOmA Linux - Hardware 10 09-21-2004 07:05 PM
Multimedia keys/mouse buttons Narooze Linux - Hardware 7 04-20-2004 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration