LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Linux Answers > Hardware
User Name
Password

Notices


By tutwabee at 2004-10-02 15:17
Make a new file falled f_lock_fix in /usr/bin, $HOME/bin, or /bin. Put this into the new file:
[code]#!/bin/sh
# This script fixes the F Lock problem on Microsoft Natural keyboards

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 69 # Save -> F11
setkeycodes d8 70 # Print -> F12


###################################################
# Copyright

by tutwabee on Sat, 2004-11-06 17:26
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.

by proglottis on Sat, 2005-04-09 10:10
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

by Ander on Sat, 2006-03-25 07:04
Great! Thanks for the tip!

by GamerX on Sun, 2007-07-22 15:47
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.

by arielito on Wed, 2007-11-21 10:22
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

by bkorb on Wed, 2008-04-30 13:33
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 12:08 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration