Bug#157170: fr_new does not work on old mac-keyboards + proposed patch
Dear Brandon, dear David,
I've tested the file "fr_new" that David provided on both a new mac
keyboard (i.e. using the keycodes of "keycodes/xfree86") and an old one
(one that uses "keycodes/macintosh", corresponding to Option "XkbModel"
"macintosh_old" in XF86Config-4).
On the new keyboard, everything is fine (the corresponding machine is a
Powerbook wallstreet laptop).
On the old keyboard, no key is mapped to 'Alt_L' any more, which is a
big problem to switch virtual terminal. (Both the "apple" key and the
"alt" key are mapped to "Mode_switch".)
I've joined a diff of a symbol file that works around this problem.
Some explanation:
Apparently, David's patch does not work on old keyboards because the
'apple/command' and 'alt/option' keys are not mapped to the same
symbolic names in old and new mac keyboards :((. (See the patch for the
details.)
[ For Brandon, in case you're not familiar with apple keyboards: the
"apple/command" key is the apple equivalent for the "alt" key of
windows: ctl+apple+on resets the computer for instance. The "alt/option"
key is the apple equivalent for "alt/gr" (!). Apple keyboards don't
distinguish between left and right apple or option keys!! -- the scan
codes are the same. ]
Extra comments in the diff.
My patch does not correct all wrong key assignements that David's patch
corrects. Its main benefit I think is to provide both a key to switch
console *and* a key to switch script. (Which is a death-or-life matter
under X as mac-French keyboards have no "bar" '|' key, which is normally
mapped to alt+shift+L .)
If it's possible, I strongly advocate including David's and mine patch
as extra files in the xlibs package, since right now, the default xlib
config for macintosh French keyboards is not usable (at least it was not
on the two mac I installed with debian). The biggest problem in my view
is the lack of script_swicth key (or Mode_switch, I don't really master
the difference), which, as explained above, is utterly important on
those damned weird French keyboards :).
Best regards
Francois
--
Francois Taiani +33 (0) 5 6133 6406
LAAS-CNRS (http://www.laas.fr) Dependable Computing
http://www.laas.fr/~ftaiani and Fault Tolerance
--- /home/ftaiani/tmp/fr-orig Wed Apr 30 10:15:51 2003
+++ /etc/X11/xkb/symbols/macintosh/fr-fta-old Wed Apr 30 10:53:03 2003
@@ -97,5 +97,39 @@
// End alphanumeric section
key <KPDL> { [ KP_Separator , KP_Delete ] };
+ // Begin modifier mappings
+
+ // (Francois Taiani) Wed Apr 30 2003 09:54:38
+ //
+ // this setting seems to work correctly for new macintosh
+ // keyboards that use keycodes/xfree86. With this setting the
+ // "apple/command" key has the effect of the traditional "alt" key
+ // of windows keyboards (which is the normal apple way, cf. for
+ // instance ctl+command+on for reset), and the "option/alt" key has
+ // the effect of alt/gr on windows which is also the normal apple
+ // way: alt+N = '~' for instance).
+
+ // key <LWIN> { [ Alt_L ] };
+ // key <LALT> { [ script_switch ] };
+
+ // The previous setting does not totally work with old macintosh keyboards
+ // (those using keycodes/macintosh) because in the keycodes
+ // "option/alt" is mapped to RALT (instead of LALT in
+ // keycodes/xfree86, apparently macintosh keyboard don't
+ // differentiate between the left and right alt/option keys, so
+ // the same symbol must be used anyway), and "apple/command" to
+ // LALT (instead of LWIN in keycodes/xfree86 -- same remark).
+ //
+ // Nevertheless, the effect is quite workable: "option/alt" as the
+ // effect of "apple/command" and reversely.
+
+ // The following setting works with old mac keyboards:
+
+ key <LALT> { [ Alt_L ] };
+ key <RALT> { [ script_switch ] };
+
+
+ // End modifier mappings
+
};
Reply to: