[ltp] Remapping Fn-Ctrl keys on Ubuntu Gutsy

Richard Neill linux-thinkpad@linux-thinkpad.org
Tue, 30 Oct 2007 18:56:56 +0000


John Jason Jordan wrote:
> On Tue, 30 Oct 2007 09:02:30 +0100
> 
>> On Mon, 29 Oct 2007, John Jason Jordan wrote:
>>> I have a T61 that is barely a week old. I want to remap the Fn and Ctrl keys in Ubuntu Gutsy amd64.

I think that the Fn key is purely a "BIOS thing", and is pretty much 
never handled by X. (*)

So I'd expect that you might be able to achieve what you want with some 
really serious ACPI hacking, but what you are trying to do is equivalent 
to remapping the power-switch into a control key.

Best wishes,

Richard


(*)That said, running xev (x event viwer) and pressing Fn on my T60p, 
does give a response: keycode 227, whereas I'd have expected nothing to 
happen. So, you can use xmodmap. Eg:

   xmodmap -e "keycode 227 = 0x39"

That makes my machine print '8' every time it receives an 'Fn' press; it 
also leaves Fn-Home etc working.

I leave getting it to work with Ctrl as an excercise - I can't figure it 
out right now!

Also, note that you'll have to run this command every time you boot (eg 
.bashrc), and that xmodmap can really mess up your keyboard while 
experimenting. I recommend you have a file open from which you can 
copy-paste characters back into your terminal.

HTH,

Richard