LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-21-2005, 04:00 PM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
how to enable laptop extra buttons.


I'm on an emachines laptop, and on the top right side of it, next to the power buttons, it has 6 extra buttons to control volume, and email/web apps.. An example is shown here
http://pcweb.mycom.co.jp/photo/artic...hines/007l.jpg

Although this is not my laptop's model, and the buttons i have are slightly different.

My question is how would i get them to work in linux? I have absolutely no idea where to start, and pressing them shows nothing in dmesg..

I'd take a pic of the ones i have if anyone wants to have a look at them.

Thanks.


EDIT:
Sorry for the poor quality.. (phone..)
A pic of the one i have is here
http://xushi.co.uk/xushi/sv/pics/key.jpg

Thanks

Last edited by xushi; 07-21-2005 at 04:03 PM.
 
Old 07-21-2005, 04:28 PM   #2
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Rep: Reputation: 50
does this help?
http://killerbob.ca/howto/inetkeys.html

do a search- I swear this was discussed SOMEWHERE (man- can't find it) sometime today.
http://www.linuxquestions.org/questi...der=descending ?
titanium_geek

Last edited by titanium_geek; 07-21-2005 at 04:29 PM.
 
Old 07-21-2005, 05:46 PM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Many thanks. I'll look at them at the morning and keep the post updated.
 
Old 07-21-2005, 11:40 PM   #4
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
I have tryed this here but doesnt work... My .Xmodmap is just like it has to be and nothing happens... my buttom cant call XF86calculator ... :/
 
Old 07-22-2005, 02:14 AM   #5
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Same here.. i followed it SBS and i populated both ~/.Xmodmap and /usr/lib/X11/xinit/Xmodmap
Code:
keycode 236 = XF86Mail
keucode 229 = XF86Search
keycode 178 = XF86HomePage
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume
keycode 237 = XF86AudioMute
But when i restart X, and run xev again, it still shows NoSymbol.
Code:
KeyRelease event, serial 31, synthetic NO, window 0x2800001,
    root 0x40, subw 0x2800002, time 25963053, (29,42), root:(34,467),
    state 0x0, keycode 229 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 

KeyPress event, serial 31, synthetic NO, window 0x2800001,
    root 0x40, subw 0x2800002, time 25965306, (29,42), root:(34,467),
    state 0x0, keycode 229 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
 
Old 07-22-2005, 06:28 AM   #6
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
I read in another tutorial that you need to call xmodmap on a new session..
http://gentoo-wiki.com/HOWTO_Use_Mul...s#Introduction

Quote:
All you have to do now is to call xmodmap whenever your X session starts. Usually a good place to do this is your $HOME/.xsession file.

File: $HOME/.xsession

/usr/X11R6/bin/xmodmap $HOME/.Xmodmap
Now, ~/.xsession doesn't exist.. If i manually create it, would that solve the problem?

On a side note, i ran
xmodmap ~/.Xmodmap
manually and got the following error
Code:
# xmodmap .Xmodmap 
xmodmap:  unknown command on line .Xmodmap:1
xmodmap:  1 error encountered, aborting.
The contents of .Xmodmap is the following
Code:
keycode 236 = XF86Mail
keucode 229 = XF86Search
keycode 178 = XF86HomePage
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume
keycode 237 = XF86AudioMute
I'm on the latest Xorg and XFce...

Last edited by xushi; 07-22-2005 at 06:31 AM.
 
Old 07-22-2005, 06:36 AM   #7
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
It should be ~.Xsession , those files are usually used by graphical login programs (like KDM, GDM or XDM).
Your file contents seems fine except for "keucode 229 = XF86Search" note the "u". Try reading xmodmap man page, you may spot some details there.
Also you could try calling xmodmap with the expression, like: xmodmap -e "keycode 178 = XF86HomePage"

Edit: Also, check that your .xinitrc (or .Xsession as commented above) file calls xmodmap, they don't always do that.

Last edited by gbonvehi; 07-22-2005 at 06:48 AM.
 
Old 07-22-2005, 06:37 AM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Does it work ? :
Code:
xmodmap -e "keycode 236 = XF86Mail"
[edit]
It seems that gbonvehi found the problem

Last edited by keefaz; 07-22-2005 at 06:38 AM.
 
Old 07-22-2005, 07:07 AM   #9
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by gbonvehi
It should be ~.Xsession , those files are usually used by graphical login programs (like KDM, GDM or XDM).
Your file contents seems fine except for "keucode 229 = XF86Search" note the "u". Try reading xmodmap man page, you may spot some details there.
haha.. didn't notice that.. (bad eyes.. bad..)
Yes fixing the typo made xmodmap run successfully.

Quote:
Edit: Also, check that your .xinitrc (or .Xsession as commented above) file calls xmodmap, they don't always do that.
I have this line in .xinitrc if it helps,
Code:
# load local modmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
Pressing a key now gives me good results in xev,
Code:
KeyPress event, serial 31, synthetic NO, window 0x2a00001,
    root 0x40, subw 0x0, time 43564421, (174,-11), root:(651,574),
    state 0x0, keycode 229 (keysym 0x1008ff1b, XF86Search), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2a00001,
    root 0x40, subw 0x0, time 43564652, (174,-11), root:(651,574),
    state 0x0, keycode 229 (keysym 0x1008ff1b, XF86Search), same_screen YES,
    XLookupString gives 0 bytes:
So i guess i can continue assigning the keys in XFce.

Thanks alot! i didn't think it would all be this easy.
 
Old 07-22-2005, 07:17 AM   #10
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Oh, one more thing...

I use alsamixer for my volume control.. aumix doesn't reallly do any effect on my system. How would i use the buttons for alsamixer?

I mean
aumix -v+5 (-5) are ineffective..
 
Old 07-22-2005, 07:26 AM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Use amixer instead of aumix
Code:
amixer -c 0 sset 'Master' 5+
amixer -c 0 sset 'Master' 5-
 
Old 07-22-2005, 09:54 AM   #12
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by keefaz
Use amixer instead of aumix
Code:
amixer -c 0 sset 'Master' 5+
amixer -c 0 sset 'Master' 5-
Hmm, that too has no effect ..
 
Old 07-22-2005, 11:13 AM   #13
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
Ok, mine is returning this but still does not open any calculator ... ;///

Code:
KeyPress event, serial 26, synthetic NO, window 0x3000001,
    root 0x38, subw 0x0, time 585202, (228,491), root:(238,579),
    state 0x10, keycode 161 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False
any ideia?
 
Old 07-22-2005, 11:19 AM   #14
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Hmm, that too has no effect ..
Post the output with ' amixer scontrols ' please

(did you try to replace Master with PCM ?)

maginotjr, it is up to the wm to react with the hotkey,
what is your current window manager ?
 
Old 07-22-2005, 11:28 AM   #15
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
Im using Dropline Gnome ...
To be honest, the only keys that work fine was those that I configured using Keyboard Shortcut ... using .Xmodmap have no effect :/
 
  


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
extra mouse buttons in Mozilla? zoinksbob Slackware 2 07-06-2004 02:19 AM
Using extra keyboard buttons? Anjin Mandriva 2 05-24-2004 04:11 AM
Actions for extra mouse buttons pavgust Linux - Hardware 0 04-22-2004 06:33 AM
Extra buttons on i8200 fettouhi Linux - Newbie 0 10-18-2003 01:59 AM
extra buttons on posh keyboards PsychosisNode Linux - Hardware 1 05-09-2003 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:45 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