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

Re: swiss german keyboard config needed (xev results)



On Monday 25 August 2003 2:55, Michel Dänzer wrote:
> (How) does this work with layouts other than us? And how do you get
> laptop with nodeadkeys?

It doesn't. Sorry about that. I went to quickly and was seduced by the idea of 
the variant. :) I've attached a patch that does it more like you had, but the 
diff is against xlibs 4.2.1-10. It looks like you diffed against the 4.3 in 
experimental.

> I still don't see the point of adding an apple file instead of using
> macintosh/us, and you still don't seem to define Multi_key.

I have Multi_key defined in this patch.

My point for having an apple file is that I'd like the macintosh symbol maps 
to be based on the default symbols. That way, when changes like the 
ISO_Shift_Level/Mode_switch and alt_is_meta happen, the Apple keyboards stay 
current.

What do you think of the current patch?

Frank
--- symbols.dir	2003-02-26 09:39:56.000000000 +0100
+++ symbols.dir	2003-08-24 12:00:07.000000000 +0200
@@ -6,7 +6,10 @@
 --p----- -m------ altwin(super_win)
 --p----- -m------ altwin(hyper_win)
 --p----- -m------ altwin(menu)
+--p----- -m------ altwin(macos_alt)
 -dp----- a------- am(basic)
+-dp----- -m------ apple(extended)
+--p----- -m------ apple(laptop)
+--p----- -m------ apple(laptop_bad_switch)
 -dp----- a------- ar(basic)
 --p----- a------- ar(qwerty)
 --p----- a------- ar(azerty)
--- rules/xfree86	2003-02-26 09:39:56.000000000 +0100
+++ rules/xfree86	2003-08-25 22:19:06.000000000 +0200
@@ -35,6 +35,7 @@
   chicony	=       xfree86         pc(pc104)
   dell		=	xfree86		pc(pc104)
   macintosh	=	xfree86		macintosh(macintosh)
+  maclaptop	=	xfree86		macintosh(macintosh)
   macintosh_old	=	macintosh	macintosh(macintosh)
   powerpcps2	=	powerpcps2	pc(pc104)
 
@@ -127,6 +128,9 @@
   macintosh	us	=	macintosh/us(extended)
   macintosh	en_US	=	macintosh/us(extended)
   macintosh	*	=	macintosh/us(extended)+macintosh/%l%(v)
+  maclaptop	en	=	macintosh/us(extended)+apple(laptop_bad_switch)
+  maclaptop	en_US	=	macintosh/us(extended)+apple(laptop_bad_switch)
+  maclaptop	*	=	macintosh/us(extended)+macintosh/%l%(v)+apple(laptop_bad_switch)
   macintosh_old	us	=	macintosh/us(extended)
   macintosh_old	en_US	=	macintosh/us(extended)
   macintosh_old	*	=	macintosh/us(extended)+macintosh/%l%(v)
@@ -172,6 +176,7 @@
   altwin:left_meta_win	=	+altwin(left_meta_win)
   altwin:super_win	=	+altwin(super_win)
   altwin:hyper_win	=	+altwin(hyper_win)
+  altwin:macos_alt	=	+altwin(macos_alt)
   compose:ralt		=	+compose(ralt)
   compose:rwin		=	+compose(rwin)
   compose:menu		=	+compose(menu)
--- symbols/macintosh/us	2003-08-20 11:22:11.000000000 +0200
+++ symbols/macintosh/us	2003-08-24 11:37:41.000000000 +0200
@@ -1,5 +1,5 @@
 // $XConsortium: macintosh /main/10 1996/01/29 19:54:54 kaleb $
-// $XFree86: xc/programs/xkbcomp/symbols/macintosh/us,v 1.6 2001/10/03 07:44:23 alanh Exp $
+// $XFree86: xc/programs/xkbcomp/symbols/macintosh/us,v 1.8 2003/08/04 10:32:31 eich Exp $
 
 // symbols definition for a Macintosh "Extended" keyboard
 
@@ -129,22 +129,24 @@
     key <RTSH> {	[  Shift_R	]	};
     key <LCTL> {	[  Control_L	]	};
     key <RCTL> {	[  Control_R	]	};
-    key <LALT> {	[  Alt_L	]	};
-    key <RALT> {	[  Alt_R	]	};
-    key <LWIN> {	[  Meta_L	]	};
-    key <WWIN> {	[  Meta_R	]	};
+    key <LALT> {	[  Alt_L, Meta_L ]	};
+    key <RALT> {	[  Alt_R, Meta_R ]	};
+    key <LWIN> {	[  Super_L	]	};
+    key <RWIN> {	[  Multi_key	]	};
     // End "Modifier" section
 
     // begin modifier mappings
     modifier_map Shift  { Shift_L , Shift_R };
     modifier_map Lock   { Caps_Lock };
     modifier_map Control{ Control_L, Control_R };
-    modifier_map Mod1   { Alt_L, Alt_R };
+    modifier_map Mod1   { Alt_L, Alt_R, Meta_L, Meta_R };
     modifier_map Mod2   { Num_Lock };
-    modifier_map Mod4   { Meta_L, Meta_R };
+    modifier_map Mod4   { Super_L, Super_R };
     modifier_map Mod5   { Scroll_Lock };
     // end modifier mappings
 
+    include "apple(extended)"
+
 // *** FIXME
 //    key <LSGT> {	[ quoteleft,	asciitilde	]	};
 //    key <AE01> {	[	  1,	exclam 		],
--- symbols/apple	2003-08-25 00:04:29.000000000 +0200
+++ symbols/apple	2003-08-25 22:22:27.000000000 +0200
@@ -0,0 +1,54 @@
+//
+// 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 ] }; 
+    // The key in the Insert position is engraved Help, with Insert sometimes
+    // above. So Help is the primary symbol with Insert in the 1st shift-level
+    key  <INS> { [ Help, Insert ] };
+// The keys next to F12, labeled F13, F14, & F15 generate codes that XFree86
+// claims not to generate. I think they should be equivalent to the PC keys
+// Print Screen / SysRq, Scroll Lock, and Pause. Linux kernel bug?
+//    key <PRSC> { [ F13 ] }; // should be keycode 93
+//    key <SCLK> { [ F14 ] }; // should be keycode 123
+//    key <PAUS> { [ F15 ] }; // should be keycode 127
+};
+
+partial modifier_keys
+xkb_symbols "laptop" {
+
+    include "apple(extended)"
+
+    // The real numlock key on the iBook (shared with F5) works internally to
+    // the keyboard. It 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.).
+    // The key in the Num_lock position is engraved with Clear.
+    override key <NMLK> { [ Clear ] };
+    // The key engraved Delete sends BKSP. To get Delete, use Shift-Delete
+    override key <BKSP> { [ BackSpace, Delete ] };
+    // These keyboards only generate a <RALT> when pressing fn+Alt. This makes
+    // it impossible to get to the third shift level on keys that are on
+    // the fn-keypad, so use the Enter key (right of <SPC>) for Mode_switch,
+    // and use fn+Enter (Apple's code for Menu) for KP_Enter.
+    replace key <KPEN> { [ ISO_Level3_Shift ] };
+    modifier_map Mod2  { ISO_Level3_Shift };	
+    // Linux kernel bug with Menu on macs means this doesn't work yet
+//    replace key <MENU> { [ KP_Enter ] }; // should be keycode 117
+};
+
+partial modifier_keys
+xkb_symbols "laptop_bad_switch" {
+    include "apple(laptop)"
+
+    // Before XFree86 4.3, most keymaps were configured to generate the 
+    // third-level shift from the second group as opposed to the third-level
+    // of the first group. These keymaps require this mapping to work as
+    // expected.
+    replace key <KPEN> { [ Mode_switch ] };
+    modifier_map Mod2  { Mode_switch };	
+};

Reply to: