Happy Hacking keyboard, Emacs, and meta

Benjamin Lutz benlutz at datacomm.ch
Sun Oct 9 20:11:03 PDT 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 186 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20051010/7c7895af/signature.bin


More information about the freebsd-questions mailing list