Re: Function Keys Not Working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Quinta 25 Maio 2006 15:40, Lovell Mcilwain escreveu:
> Has anyone been able to figure out a way to bypass the laptop function
> keys not working?  I want to be able to send my laptop vga signal to my
> monitor but using fn + f8 doesn't seem to work (as well as a bunch of
> the other function keys).

There are many ways to workaround this. Most of them involve modifying kxb 
configuration. In my notebook and in my home desktop (which has an internet 
keyboard with many extra keys), I've done the following:
1. Use xev to get the scancodes or the non-working keys. Execute xev in a 
graphical console and press the keys. Two events will be generated for each 
key press: one on key down and another on key up. You will see the key code 
in both of them. (*)
2. Go to /usr/share/X11/xkb/keycodes. Look for the key code you've found in 
the previous step in the file xfree86, using grep (for example, "grep 160 
xfree86", replacing 160 with your key code). You'll get a line which 
associates this key code to a xkb symbol (something between < and >, like 
<I20>)
3. Go to /usr/share/X11/xkb/symbols. Look for the symbol you've found in 
previous step in the file inet. This file contains bindings for the extra 
keys generally found in internet and multimedia keyboards. For example, 
execute "grep <I20> inet". You'll see many lines binding the symbol to 
multimedia key names, which may vary from keyboard to keyboard. Choose a name 
that is related to the key in your keyboard. It really doesn't matter what 
name you choose, just choose one that exists in xkb configuration. Copy the 
entire line which contains the name you've chose.
4. Still in /usr/share/X11/xkb/symbols, open the file that matches the 
keyboard layout you're using and add to your keyboard layout the line you've 
copied in the previous step.
5. Restart X. Your extra keys will be recognized by xkb now. You can bind them 
to any thing you want in your GUI. They can now be used as shortcuts to 
applications or system actions, as well as to execute commands.


(*) Some keys may not be configured at all in xkb, and in this case xev won't 
detect the key press. If this happens, go to a text console (CTRL+ALT+F1), 
execute tail -f /var/log/messages and observe if something is logged there 
when you press the key. It will probably show that the key with code 0x???? 
is not recognized by the system. Do what the log message suggests: bind this 
code on an unused key code using setkeycodes. After doing that, xev 
will "see" when the key is pressed and you'll be able to follow the 
instructions above. However, the setkeycodes command will need to be executed 
everytime you boot, so add it to your /etc/rc.d/rc.local.

[]'s
Marcelo


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]
  Powered by Linux