Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today!
Try Our New Product Showcase!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Misc > How do i find the keycode .......

Forgot Password?
 Misc   Any questions or Linux discussion that does not fit in any of the other technical areas.

Site Navigation
Linux Forums
Linux Articles
Product Showcase
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Free Publications




Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 02-03-2004   #1 (permalink)
Linux Guru
 
loft306's Avatar
 
Join Date: Oct 2003
Location: The DairyLand
Posts: 1,666
How do i find the keycode .......

How do i find the keycode for a spacific keyboard key & or the whole KB.
i ask because i need to give life to the R 'ctrl' and 'alt' on a dvorak KB
__________________
~Mike ~~~ Forum Rules
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
http://loft306.org
loft306 is offline  



Reply With Quote
Old 02-03-2004   #2 (permalink)
Linux Guru
 
sarumont's Avatar
 
Join Date: Apr 2003
Location: /dev/urandom
Posts: 3,682
Open up an xterm and type the command 'xev'. This will monitor all your inputs and tell you everything about them. Just keep an eye on the terminal when you hit the buttons you want to check and you will see the keycode.
__________________
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
sarumont is offline   Reply With Quote
Old 02-04-2004   #3 (permalink)
Linux Enthusiast
 
scientica's Avatar
 
Join Date: Sep 2003
Location: South- or "Mid-" Sweden
Posts: 742
Send a message via ICQ to scientica
How can I assign a funcion/command for a key? (like the "windows button" and the "popup menu button")?
__________________
Regards Scienitca (registered user #335819 - http://counter.li.org )
--
A master is nothing more than a student who knows something of which he can teach to other students.
scientica is offline   Reply With Quote
Old 02-04-2004   #4 (permalink)
Linux Guru
 
loft306's Avatar
 
Join Date: Oct 2003
Location: The DairyLand
Posts: 1,666
you need to edit the apropriate keyboard map archive located->
Code:
file&#58;/usr/share/kbd/keymaps/i386/ <filename>
and u can find out which one u need to edit from
Code:
file&#58;/etc/X11/Xf86config
  • Section "InputDevice"
    Driver "keyboard"
    Identifier "Keyboard[0]"
    Option "MapName" "Generic keyboard [ pc101 ]"
    Option "Protocol" "Standard"
    Option "XkbLayout" "dvorak"
    Option "XkbModel" "pc101"
    Option "XkbRules" "xfree86"
    EndSection
__________________
~Mike ~~~ Forum Rules
Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
http://loft306.org
loft306 is offline   Reply With Quote
Old 02-05-2004   #5 (permalink)
Linux Guru
 
sarumont's Avatar
 
Join Date: Apr 2003
Location: /dev/urandom
Posts: 3,682
scientia: You can also use xmodmap or xbindkeys.
__________________
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
sarumont is offline   Reply With Quote
Old 02-05-2004   #6 (permalink)
Linux Enthusiast
 
scientica's Avatar
 
Join Date: Sep 2003
Location: South- or "Mid-" Sweden
Posts: 742
Send a message via ICQ to scientica
Thanks sarumont! (it took me a while to get it working thougt, but now it's 'perfect' -- it's customization than in windows , now one of my "windows keys" opens GNU emcas )
__________________
Regards Scienitca (registered user #335819 - http://counter.li.org )
--
A master is nothing more than a student who knows something of which he can teach to other students.
scientica is offline   Reply With Quote
Old 02-06-2004   #7 (permalink)
Linux Guru
 
sarumont's Avatar
 
Join Date: Apr 2003
Location: /dev/urandom
Posts: 3,682
Just foi, what prog did you use to bind them?

And a side note: I've seen keyboards with a little penguin on the "windows keys" instead of a windows symbol. And they were all hooked up to puters running Windows at a LAN party.
__________________
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
sarumont is offline   Reply With Quote
Old 02-07-2004   #8 (permalink)
Linux Enthusiast
 
scientica's Avatar
 
Join Date: Sep 2003
Location: South- or "Mid-" Sweden
Posts: 742
Send a message via ICQ to scientica
Quote:
Originally Posted by sarumont
Just foi, what prog did you use to bind them?

And a side note: I've seen keyboards with a little penguin on the "windows keys" instead of a windows symbol. And they were all hooked up to puters running Windows at a LAN party.
I've only seen pics of the "Tux Key"

I use xmodmap, after some xev'ing I also bound a few other keys, I made a fix_keys bash script:
Code:
#!/bin/bash
# 115 = left winkey, 116 = right winkey
xmodmap -e 'keycode 115 = Super_L'
xmodmap -e 'keycode 116 = Super_R'
xmodmap -e 'keycode 0x75 = Menu'
# www
xmodmap -e 'keycode 178 = XF86HomePage'
# e-mail
xmodmap -e 'keycode 236 = XF86Mail'
# Stop
xmodmap -e 'keycode 164 = XF86AudioStop'
# Play/Pause
xmodmap -e 'keycode 162 = XF86AudioPlay'
# Previous
xmodmap -e 'keycode 144 = XF86AudioPrev'
# Next
xmodmap -e 'keycode 153 = XF86AudioNext'
# Mute
xmodmap -e 'keycode 160 = XF86AudioMute'
# Vol -
xmodmap -e 'keycode 174 = XF86AudioLowerVolume'
# Vol +
xmodmap -e 'keycode 176 = XF86AudioRaiseVolume'
# power = 222, Sleep = 223, Wake up = 227
xmodmap -e 'keycode 227 = XF86WakeUp'
(I've also made a ~/.Xmodmap, but it's untested -- haven't restarted X)
Code:
keycode 0x73 = Super_L
keycode 0x74 = Super_R
keycode 0x75 = Menu
keycode 178 = XF86HomePage
keycode 236 = XF86Mail
keycode 164 = XF86AudioStop
keycode 162 = XF86AudioPlay
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 227 = XF86WakeUp
then I used the IceWM's 'keys' config file to bind it, I first assigned F13,F14 to the WinKeys and added "actions" for them.
Untill I made some diging in the IceWM CVS (-headace-), and found out that they use Super_L and Super_R for the windows keys -- there is a config option that enables IceWM to use Super_L (Win_L) as shortcu to the IceWM menu, Super_R (Win_R) opens the window list. And menu does the same as right clicking (in some apps, like X-Chat , alas not in MFB).

Then I had to fight with the keyboard layout (changed from pc102 to pc109 (pc104, or was it pc105 -- didn't work, some keys didn't listen then)).
__________________
Regards Scienitca (registered user #335819 - http://counter.li.org )
--
A master is nothing more than a student who knows something of which he can teach to other students.
scientica is offline   Reply With Quote
Old 03-06-2004   #9 (permalink)
Just Joined!
 
Join Date: Feb 2004
Location: Ontario, Canada
Posts: 19
Send a message via ICQ to The unL33T Send a message via AIM to The unL33T Send a message via MSN to The unL33T
Can anyone tell my how I can get the windows key to open the KDE menu? I found a place for configuring keyboard shortcuts but it will only let me use the Windows key + something else (ie Win+1 or Win+F1 or something like that). Also, I can't get xev to read my volume control buttons. I use them by pressing Fn+End,Pg Up, or Pg Dn. This is on a Dell notebook. I even changed my keyboard layout to Dell Inspiron (I don't know if they're the same but should be similar).
The unL33T is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Implementing Detailed User-Level Auditing of UNIX & Linux Systems
Enhance regulatory compliance and troubleshooting through detailed auditing, logging and real-time monitoring of UNIX/Linux user activity.
subscribe
Linux from Scratch - Receive Your Complimentary eBook NOW!
Linux from Scratch describes the process of creating your own Linux system from scratch from an already installed Linux distribution, using nothing but the source code of software that you need.
subscribe
A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)
Getting Started with Ubuntu 10.04 (Lucid Lynx) is a comprehensive beginners guide for the Ubuntu operating system; it features comprehensive guides, How Tos and information on anything you need to know after first installing Ubuntu.
subscribe
The Incredible Guide to NEW Ubuntu (Karmic Koala)
There are a lot of people still stuck with Windows because it's the ‘easier alternative'. Linux is both cheaper and more versatile than Microsoft's operating system, but the learning curve has frightened off many people.
subscribe
The GNU/Linux Advanced Administration
The GNU/Linux systems have reached an important level of maturity, allowing to integrate them in almost any kind of work environment, from a desktop PC to the sever facilities of a big company.
subscribe
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe



All times are GMT. The time now is 06:15 AM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1