There are two annoying problems with Apple keyboards:
1. Function keys (F1, F2, ...) work as they supposed to work only when pressing them with FN key. I rely on virtual desktops a lot and I use Ctrl-Fx to switch between them, so you imagine how annoying is that to use Ctrl-Fn-Fx to switch a desktop.
2. Apple keyboard misses 'Insert' key completely, so you cannot use Ctrl-Insert for pasting, so it's extremely annoying also.
Fortunately, both problems could be easily solved.
Several days ago Nathan Whitehorn ⟨nwhitehorn@) committed a support for dev.akbd.%d.fn_keys_function_as_primary which allows you to configure F-keys behavior. In order to make the keys look as F1,F2,... without pressing FN, execute:
sysctl dev.akbd.0.fn_keys_function_as_primary=1
The Insert key problem could be solved on X level: I've used xmodmap (x11/xmodmap) to remap F11 to Insert, which is a good solution for me because I don't use F11 key and it's located quite close to a place where you'd expect to have 'Insert' key on a typical keyboard.
So I've created ~/.Xmodmap file:
keycode 95 = Insert
And added execution of "xmodmap ~/.Xmodmap" on X session start.
I'm not sure if F11 has keycode 95 on every Apple keyboard, it's easy to figure out keycode using xev (x11/xev).
yeah
ReplyDeletethe same as me but mine is dell which there is no Scroll Lock key
many thanks indeed
I have an USB Apple Aluminium Keyboard, the F-keys work normally, but I wonder how to use F13-F19 (xev doesn't react to them at all)…
ReplyDeletehttp://store.apple.com/us/product/MB110LL/B?fnode=MTY1NDA1Mg
lapo, I don't have such a keyboard. You might want to post a question to freebsd-powerpc@ maillist. I think it's akbd driver related, not to X.
ReplyDeletenice idea, thanks for sharing
ReplyDeleteour websites are
徵信社 and 櫻桃
very welcome to see us