diff lisp/x-win-xfree86.el @ 3171:4cad7ff4a200

[xemacs-hg @ 2005-12-24 19:53:53 by aidan] Incremental changes to improve Russian C-x processing--support punctuation, XFree86 and Sun keyboards, document the facility.
author aidan
date Sat, 24 Dec 2005 19:54:01 +0000
parents 7039e6323819
children e34711681f30
line wrap: on
line diff
--- a/lisp/x-win-xfree86.el	Sat Dec 24 19:06:05 2005 +0000
+++ b/lisp/x-win-xfree86.el	Sat Dec 24 19:54:01 2005 +0000
@@ -46,6 +46,37 @@
 
 ;;;###autoload
 (defun x-win-init-xfree86 ()
+
+  ;; We know this keyboard is an XFree86 keyboard. As such, we can predict
+  ;; what key scan codes will correspond to the keys on US keyboard layout,
+  ;; and we can use that information to fall back to the US layout when
+  ;; looking up commands that would otherwise fail. (Cf. the hard-coding of
+  ;; this information in /usr/X11R6/lib/X11/xkb/keycodes/xfree86 )
+  ;;
+  ;; These settings for x-us-keymap-first-keycode and
+  ;; x-us-keymap-description were determined with 
+  ;; 
+  ;; setxkbmap us
+  ;; xmodmap -pke > keyboard-description.txt
+  ;;
+  ;; "8" is the key code of the first line, x-us-keymap-description is
+  ;; taken from the column describing the bindings. 
+
+  (setq x-us-keymap-first-keycode 8
+	x-us-keymap-description
+	[nil nil [?1 ?!] [?2 ?@] [?3 ?\#] [?4 ?$] [?5 ?%] [?6 ?^] [?7 ?&]
+	     [?8 ?*] [?9 ?\(] [?0 ?\)] [?- ?_] [?= ?+] nil ?\t [?q ?Q] 
+	     [?w ?W] [?e ?E] [?r ?R] [?t ?T] [?y ?Y] [?u ?U] [?i ?I] [?o ?O]
+	     [?p ?P] [?\[ ?{] [?\] ?}] nil nil [?a ?A] [?s ?S] [?d ?D]
+	     [?f ?F] [?g ?G] [?h ?H] [?j ?J] [?k ?K] [?l ?L] [?\; ?:]
+	     [?\' ?\"] [?\` ?~] nil [?\\ ?|] [?z ?Z] [?x ?X] [?c ?C]
+	     [?v ?V] [?b ?B] [?n ?N] [?m ?M] [?\, ?<] [?\. ?>] [?/ ?\?]
+	     nil ?* nil ?\  nil nil nil nil nil nil nil nil nil nil nil
+	     nil nil ?7 ?8 ?9 ?- ?4 ?5 ?6 ?+ ?1 ?2 ?3 ?0 ?\. nil nil 
+	     [?< ?>] nil nil nil nil nil nil nil nil nil nil nil nil 
+	     nil nil nil nil nil ?/ nil nil nil nil nil nil nil nil 
+	     nil nil nil nil nil ?=])
+
   (loop for (key sane-key) in
     '((f13 f1)
       (f14 f2)