LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxAnswers Discussion (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/)
-   -   DISCUSSION: Microsoft Keyboard Function Key Fix (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/discussion-microsoft-keyboard-function-key-fix-248618/)

tutwabee 10-28-2004 10:22 PM

DISCUSSION: Microsoft Keyboard Function Key Fix
 
This thread is to discuss the article titled: Microsoft Keyboard Function Key Fix

tutwabee 11-06-2004 04:26 PM

If the shell script in the tutorial doesn't work then you can change your /ect/X11/xkb/keycodes/xfree86 file to contain this:
Quote:

<FK01> = 187;
<FK02> = 136;
<FK03> = 135;
<FK04> = 119;
<FK05> = 120;
<FK06> = 121;
<FK07> = 122;
<FK08> = 194;
<FK09> = 195;
<FK10> = 163;
<FK11> = 215;
<FK12> = 216;
Make sure to comment out any other lines that have "= 187" or any of the other numbers in them. Also make sure the old FK01-FK12 lines are commented out.

proglottis 04-09-2005 10:10 AM

For Logitech Elite Keyboards (might work with others too) try this:
Code:

setkeycodes e03b 59
setkeycodes e03c 60
setkeycodes e03d 61
setkeycodes e03e 62
setkeycodes e03f 63
setkeycodes e040 64
setkeycodes e041 65
setkeycodes e042 66
setkeycodes e043 67
setkeycodes e044 68
setkeycodes e057 87
setkeycodes e058 88


Ander 03-25-2006 06:04 AM

Great! Thanks for the tip!

GamerX 07-22-2007 03:47 PM

Using these values for a "Microsoft MultiMedia Keyboard 1.0A" (with desired results :))
Code:

setkeycodes bb 59 # Help  -> F1
setkeycodes 88 60 # Undo  -> F2
setkeycodes 87 61 # Redo  -> F3
setkeycodes be 62 # New  -> F4
setkeycodes bf 63 # Open  -> F5
setkeycodes c0 64 # Close -> F6
setkeycodes c1 65 # Reply -> F7
setkeycodes c2 66 # Fwd  -> F8
setkeycodes c3 67 # Send  -> F9
setkeycodes a3 68 # Spell -> F10
setkeycodes d7 87 # Save  -> F11
setkeycodes d8 88 # Print -> F12

Also useful bit of code to add to /etc/rc.d/rc.local (or equivalent):
Code:

#Fix the F-Lock scan codes for F1-F12 on Microsoft MultiMedia Keyboards
if [ -x /usr/local/bin/f_lock_fix ]; then
        echo "Fixing the F-Lock scan codes for F1-F12 keys...";
        /usr/local/bin/f_lock_fix;
fi

EDIT: The "showkey" command is useful to find the scancodes for a different version.

arielito 11-21-2007 09:22 AM

You may want to check out Keytouch:

http://keytouch.sourceforge.net/

I worked really fine for me.

Discussed here:
http://ubuntuforums.org/showthread.php?t=185478&page=2

bkorb 04-30-2008 01:33 PM

It looks very clever. However, if I run it as myself, I get "operation not permitted". If I run it as root, I get "invalid argument". I'd just press the silly F-Lock key, except that it is continually and regularly turning itself off, so I am pressing it over and over and over .... Very, very tiresome. Also, the scan codes for the "Microsoft Wireless Natural MultiMedia Keyboard" are different:

setkeycodes 0x8A 59
setkeycodes 0x83 60
setkeycodes 0xB6 61
setkeycodes 0xB5 62
setkeycodes 0x8F 63
setkeycodes 0xCE 64
setkeycodes 0xE8 65
setkeycodes 0xE9 66
setkeycodes 0xE7 67
#etkeycodes 0x00 68
setkeycodes 0xEA 69
setkeycodes 0xD2 70

node that F10 does not even emit a recognizable scan code, unless the "F-Lock" is on. Then it does just fine. Argh!!!!


All times are GMT -5. The time now is 04:55 PM.