Is there any way to swap the fn (function) and control keys in linux on an macbook pro? [closed]
Asked Answered
M

1

8

I don't care if this is done in the bios or a kernel module or software. Is there any way at all to do make the 'fn' key act as 'control' and the 'control' key act as 'fn' in linux running on a macbook pro?

PS. You can do this with software in OSX with the application KeyRemap4MacBook.

Moule answered 22/1, 2011 at 12:53 Comment(2)
Use this kernel module: github.com/free5lot/hid-apple-patchedAnastasiaanastasie
Precisely what I needed to do (on elementaryOS 6.0) was documented here: unix.stackexchange.com/a/156629/278323, where it is "on topic."Toddle
S
2

Try the command "xev" and press the Fn key.

On my computer (Lenovo T60), I see this in the terminal when I press the Fn key:

KeyPress event, serial 33, synthetic NO, window 0x3c00001,
    root 0x6d, subw 0x0, time 2266123481, (652,782), root:(655,915),
    state 0x10, keycode 151 (keysym 0x1008ff2b, XF86WakeUp),

So the Fn key is keycode 151. My left control is 37. Then you can remap, now knowing the key codes they generate.

https://web.archive.org/web/20090202093048/http://www.columbia.edu/~djv/docs/keyremap.html

Sloop answered 13/2, 2011 at 22:48 Comment(5)
The Fn key on a Mac does not generate an event in xev.Yerga
The link does not workJepum
@JimmyKane, Try this link web.archive.org/web/20090202093048/http://www.columbia.edu/~djv/…Wilder
If the key does not generate any event, what should I do? Any ideas.Grenade
This project solved the issue for me: github.com/free5lot/hid-apple-patchedDepreciate

© 2022 - 2025 — McMap. All rights reserved.