From xemacs-m  Tue Sep 16 16:45:33 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA17317
	for <xemacs-beta@xemacs.org>; Tue, 16 Sep 1997 16:45:26 -0500 (CDT)
Received: (from hniksic@localhost)
	by jagor.srce.hr (8.8.7/8.8.6) id XAA15463;
	Tue, 16 Sep 1997 23:45:23 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: Keysym changes in Tirana (b20)
References: <6179.874423575@kocrsw12> 	<ocr3en58d5h.fsf@ml.com> 	<kigd8m9kz8x.fsf@jagor.srce.hr> <199709162047.NAA03290@xemacs.eng.sun.com>
X-Attribution: Hrvoje
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 16 Sep 1997 23:45:22 +0200
In-Reply-To: Martin Buchholz's message of "Tue, 16 Sep 1997 13:47:50 -0700"
Message-ID: <kigvi019bm5.fsf@jagor.srce.hr>
Lines: 59
X-Mailer: Quassia Gnus v0.5/XEmacs 20.3(beta20) - "Tirana"

Martin Buchholz <mrb@Eng.Sun.COM> writes:

> Hrvoje, please help debug this.  Apparently your Linux console has a
> different X key mapping than what x-win-xfree86.el expects.
> 
> Try 
> xmodmap -pke | grep 'F[0-9]'

Output:

keycode  67 = F1 F11
keycode  68 = F2 F12
keycode  69 = F3 F13
keycode  70 = F4 F14
keycode  71 = F5 F15
keycode  72 = F6 F16
keycode  73 = F7 F17
keycode  74 = F8 F18
keycode  75 = F9 F19
keycode  76 = F10 F20
keycode  95 = F11
keycode  96 = F12


This seems to work for me, to some extent.  However, I don't know what
the `key' parameter (the middle one) means!


;; For no obvious reason, shift-F1 is called F13, although Meta-F1 and
;; Control-F1 have normal names.

(loop for (x-key key sane-key) in
  '(("F13" f11 f1)
    ("F14" f12 f2)
    ("F15" f13 f3)
    ("F16" f14 f4)
    ("F17" f15 f5)
    ("F18" f16 f6)
    ("F19" f17 f7)
    ("F20" f18 f8)
    ;; So far so good.  The troubles begin now:
    ("F21" f19 f9)      ; -> Sh-f9 reported as Sh-f7
    ("F22" f20 f10)     ; -> Sh-f10 reported as Sh-f8
    ;; Good
    ("F23" f21 f11)
    ("F24" f22 f12))
  do
  (when (and (x-keysym-on-keyboard-p x-key)
	     (not (x-keysym-on-keyboard-sans-modifiers-p x-key)))
    ;; define also the control, meta, and meta-control versions.
    (loop for mods in '(() (control) (meta) (meta control)) do
      (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)])
      )))


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Ask not for whom the <CONTROL-G> tolls.

