[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Supplemental Apple keymap



I've attached a small symbol keymap to see what folks here think. To use it, 
copy it to /etc/X11/xkb/symbols/apple and run
`setxkbmap -v 6 -symbols 'macintosh/us+apple(laptop)'`

I've also put an 'extended' version for desktop keyboards that have Help 
instead of Insert and other changes. However many of them are commented out 
because there are bugs in XFree86 with them.

Also, there's a macos_alt flavor that will change the Alt key to do 
Mode_switch as is expected outside of the US.

Please read this file, try it, and let me know how it goes.

Frank
//
// Keyboard modification for Apple keyboards
//
// $Xfree86: $

partial default modifier_keys
xkb_symbols "extended" {

// Keypad equal is buggy on XFree 4.3.
//    key <KPEQ> { [ KP_Equal ] }; 
    key  <INS> { [ Help ] };
// The keys next to F12, labeled F13, F14, & F15 generate codes that XFree86
// claims not to generate.
//    key <PRSC> { [ F13 ] }; // keycode 93
//    key <SCLK> { [ F14 ] }; // keycode 123
//    key <PAUS> { [ F15 ] }; // keycode 127

};

partial modifier_keys
xkb_symbols "laptop" {

    include "apple(extended)"

    // The real numlock key on the iBook (shared with F5) illuminates the
    // Num_Lock led and locks the fn-key to type only the keypad keys on the
    // letter keys (U=4, I=5, O=6, P=*, etc.). This happens internally to the
    // keyboard. Instead the key generates Clear.
    override key <NMLK> { [ Clear ] };
    // Why can't I do this?
    //override key <NMLK> { [ NoSymbol ] };
    // The key labeled Delete sends BKSP. To get Delete, use Shift-Delete
    override key <BKSP> { [ BackSpace, Delete ] };
    // These keyboards only generate a <RALT> when pressing fn+Alt. To make
    // it easier to generate Mode_switch, use the Enter key (right of <SPC>.)
    override key <KPEN> { [ Mode_switch, KP_Enter ] };
};

// Outside the US, Apple keyboards use the Alt key to type the third glyph
// on each key. macos_alt allows that behavior in X, instead using the
// Apple-logo key for Meta. Should altwin(meta_win) be included?
partial modifier_keys
xkb_symbols "macos_alt" {
    key <RALT> { [ Mode_switch, Alt_R] };
    key <RWIN> { [ Meta_R, Super_R ] ];
};

Reply to: