LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-18-2007, 09:47 AM   #1
arun.tayal
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
Problem in mapping keyboard in Red Hat 8.0


Dear All,

I want to map the <Alt>+<Ctrl>+F1 with the F12 key .It means ,whenever I press the F12 key , the system should switch to console mode.
For this I am modifying the Xmodmap file .
The Xmodmap file can be generated using command
xmodmap -pke > Xmodmap

It contains the mapping of all the keycodes with their corresponding keysymbols.

Originally the entry in Xmodmap file of Red Hat Enterprise Linux 4.0 against F12 key appears as:
keycode 96 = F12 XF86_Switch_VT_12

I changed this entry to:
keycode 96 = XF86_Switch_VT_1

and then loading these changes using command
xmodmap Xmodmap

Its working perfectly fine in RHEL 4.0.

But when I try to repeat this process in Red Hat Linux 8.0 then,
the entry against F12 key in Xmodmap file is appearing as:
keycode 96 = F12

after changing this entry to
keycode 96 = XF86_Switch_VT_1

and trying to load the settings using xmodmap command , then error is coming.
The error says that "XF86_Switch_VT_1 is bad keysym".

Please help me how should I do this in Red hat Linux 8.0

Regards
Arun
 
Old 10-19-2007, 05:33 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
It's possible that the switch from RHEL 4.0 to Red Hat Linux 8.0 also involved a switch from XFree86 to Xorg. If that is indeed the case, then the keycode for F12 may have changed.

From the Arch Linux Wiki:
Quote:
The diagnosis

The most global way to diagnose the situation is to go in console and use the 'showkey' utility. Please note that this utility will not work when in X so you'll need to switch to another tty (e.g. CTRL+ALT+F6).

First of all we run:
$ showkey

without options: 'showkey' waits for ten seconds that we press a key (after ten seconds it quits automatically) and displays the keycode of the key we pressed.
Source: http://wiki.archlinux.org/index.php/Hotkeys

So, to learn the correct keycode for F12 in Xorg, switch to a VT and run 'showkey'. You have 10 seconds before showkey will timeout. In those 10 seconds, press the F12 key. The return will be the keycode for F12.

Then, edit your xmodmap
Quote:
keycode 96 = XF86_Switch_VT_1
to show the keycode for Xorg.

In my SuSE installation, that keycode is 88.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
another keyboard mapping problem twallstr Linux - Hardware 1 05-11-2006 07:45 AM
Keyboard mapping problem lansman Linux - Newbie 1 03-15-2003 12:45 PM
Keyboard mapping problem lansman Linux - Hardware 1 03-15-2003 12:24 PM
Red Hat 8 keyboard and mouse problem patatwist Linux - Newbie 2 02-27-2003 09:43 PM
Red Hat 8 Keyboard/Mouse Problem aklrabbi Linux - General 1 12-11-2002 11:21 AM


All times are GMT -5. The time now is 10:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration