LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2008, 09:58 PM   #1
anitha.mit
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Rep: Reputation: 0
Setting keys


Hi all,

I have tried to set the keycode for some hotkeys in my laptop. I used showkey command to get the scancodes and then i assigned keycode to that scancodes by using the command setkeycodes. I placed them in a script called .setkeycodes in in the path /root. The contents of .setkeycodes script is as follows,

setkeycodes e022 92
setkeycodes e024 93
setkeycodes e010 94
setkeycodes e019 95

The keysym for that keycodes are set in .Xmodmap file in the path /root and the contents of that file is,

keycode 100 = XF86AudioPause
keycode 101 = XF86AudioStop
keycode 102 = XF86AudioPrev
keycode 103 = XF86AudioNext.

I called that script and file in /etc/rc.d/rc.local script by adding the following lines to that script,
cd /root
xmodmap .Xmodmap
/.setkeycodes

My problem is, when i tried to check the assigned keysyms, all the keys are working properly except the AudioStop key. I got the output without having keysym and keycode in xev when i pressed the AudioStop(Fn+F10) key.
But when i assigned the keysym for AudioStop key in command prompt it was working properly. I have removed the line 'keycode 101 = XF86AudioStop' from the .Xmodmap file and then i rebooted puppy. I got the output of having keysym as 'NoSymbol' and keycode as 101 when i pressed the Fn+F10 key. Can anyone tell me what is the problem here? How can i set the AudioStop key to work properly?

Regards,
Anitha..
 
Old 01-02-2008, 10:57 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Why are you putting these files in /root/? Only the root user can read them.
 
Old 01-02-2008, 11:52 PM   #3
anitha.mit
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Setting keys

Im using puppy linux. So i put them in /root.
 
Old 01-04-2008, 05:57 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Puppy Linux only has a root user? You can't create normal user accounts?

Anyway I used xev to get the charcodes to use and put them in my ~/.Xmodmap file. The media keys would effect apps like kmix. I didn't use setkeycodes however.

I'm sure that your values would be different:
Code:
cat .Xmodmap
keycode 174 = XF86AudioLowerVolume
keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 178 = XF86HomePage
keycode 223 = XF86Standby
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext

Last edited by jschiwal; 01-15-2008 at 04:35 AM. Reason: Fixed error.
 
  


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
KGpg setting for importing public keys linuxbeliever Debian 2 06-12-2007 12:17 PM
Setting keys on keyboard using xmodmap aoberoi Ubuntu 7 06-18-2006 01:50 AM
Changing server password AFTER setting ssh-auto keys Swakoo Linux - General 1 02-22-2006 04:38 AM
Problem setting up multimedia keys in Gnome 2.6 Phantomas Linux - Software 7 06-07-2004 01:36 AM
Need help setting up the "extra" keys on my Logitech iTouch Keyboard Theoutdoorsman Linux - Hardware 1 10-16-2003 05:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:21 AM.

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