Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2005 05:10:53 +0200
From:      Benjamin Lutz <benlutz@datacomm.ch>
To:        Kirk Strauser <kirk@strauser.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Happy Hacking keyboard, Emacs, and meta
Message-ID:  <4349DBBD.3010905@datacomm.ch>
In-Reply-To: <200510091641.48542.kirk@strauser.com>
References:  <200510091641.48542.kirk@strauser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig9A7EDC0E52347034C1026C92
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Kirk Strauser wrote:
> I have an older PS2 Happy Hacking Lite Keyboard (love it!), but I'm getting 
> reacquainted with Emacs and one aspect of the keyboard is driving me nuts: I 
> can't seem to get the diamond keys (like "Windows keys") to send only Meta to 
> Emacs.
> 
> I use KDE on FreeBSD 6.0-BETA5 and have it set to run "setxkbmap -option 
> -option altwin:meta_win" at login.  If I run "xev" and press those keys, I 
> see events like:
>
> [...]
> 
> However, if I run Emacs and type C-h k (describe-key) and then M-a, for 
> example, I get the error message "H-M-s-a is undefined" as though the 
> keyboard is sending Hyper-Meta-shift(?)-a instead.

This looks like an issue similar to one I've run into once.

You'll need to customize your keyboard layout files, specifically,
/usr/X11R6/lib/X11/xkb/symbols/pc. Try this patch:

-----PATCH START-----
--- pc.orig     Thu Aug 18 20:18:20 2005
+++ pc  Sat Aug 27 13:03:06 2005
@@ -180,11 +180,12 @@
     key <META> {       [ NoSymbol, Meta_L      ]       };
     modifier_map Mod1   { <META> };

-    key <SUPR> {       [ NoSymbol, Super_L     ]       };
-    modifier_map Mod4   { <SUPR> };
+    //key <SUPR> {     [ NoSymbol, Super_L     ]       };
+    //modifier_map Mod4   { <SUPR> };
+    modifier_map Mod4  { <LWIN>, <RWIN> };

-    key <HYPR> {       [ NoSymbol, Hyper_L     ]       };
-    modifier_map Mod4   { <HYPR> };
+    //key <HYPR> {     [ NoSymbol, Hyper_L     ]       };
+    //modifier_map Mod4   { <HYPR> };
 };

 // definition for the PC-AT type 101 key keyboard
-----PATCH END-----

If that doesn't work, start playing around with the keyboard definition
files. The system's not too hard to understand: numeric keycodes are
assigned symbols in /usr/X11R6/lib/X11/xkb/keycodes, and those symbols
are then assigned Keysyms in /usr/X11R6/lib/X11/xkb/symbols.

Hope this helps.

Cheers
Benjamin

--------------enig9A7EDC0E52347034C1026C92
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFDSdvAgShs4qbRdeQRAj6IAKCKX7ieVLGOGt590T/66IbtbEHjbACfQxiX
16Lmh3JPVTjdiRkm7sNDbOI=
=llaN
-----END PGP SIGNATURE-----

--------------enig9A7EDC0E52347034C1026C92--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4349DBBD.3010905>