LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem in mapping keyboard in Red Hat 8.0 (https://www.linuxquestions.org/questions/linux-newbie-8/problem-in-mapping-keyboard-in-red-hat-8-0-a-592736/)

arun.tayal 10-18-2007 08:47 AM

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

bigrigdriver 10-19-2007 04:33 AM

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.


All times are GMT -5. The time now is 05:06 PM.