From xemacs-m  Tue Sep 16 15:49:33 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id PAA16432
	for <xemacs-beta@xemacs.org>; Tue, 16 Sep 1997 15:49:30 -0500 (CDT)
Received: from Eng.Sun.COM ([129.146.1.25]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id NAA12943 for <xemacs-beta@xemacs.org>; Tue, 16 Sep 1997 13:48:48 -0700
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id NAA22442; Tue, 16 Sep 1997 13:48:26 -0700
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id NAA23460; Tue, 16 Sep 1997 13:47:51 -0700
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id NAA03290; Tue, 16 Sep 1997 13:47:50 -0700
Date: Tue, 16 Sep 1997 13:47:50 -0700
Message-Id: <199709162047.NAA03290@xemacs.eng.sun.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: Hrvoje Niksic <hniksic@srce.hr>
Cc: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: Keysym changes in Tirana (b20)
In-Reply-To: <kigd8m9kz8x.fsf@jagor.srce.hr>
References: <6179.874423575@kocrsw12>
	<ocr3en58d5h.fsf@ml.com>
	<kigd8m9kz8x.fsf@jagor.srce.hr>
X-Mailer: VM 6.33 under 20.3 "Vienna" XEmacs  Lucid (beta14)
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>

>>>>> "Hrvoje" == Hrvoje Niksic <hniksic@srce.hr> writes:

Hrvoje> Colin Rafferty <craffert@ml.com> writes:
>> Mike Scheidler writes:
>> 
>> > The "Stop" and "Again" keys on my Sun Type 5 keyboard are now reporting as 
>> > "f11" and "f12".
>> 
>> > I already have f11 and f12 keys--I don't need any more.  :-)
>> 
>> Me too!

Hrvoje> And I get this:

Hrvoje> Pressed:      C-h c reports:
Hrvoje> Sh-f1         f11
Hrvoje> Sh-f2         f12
Hrvoje> Sh-f3	      Sh-f1
Hrvoje> Sh-f4         f2
Hrvoje> Sh-f5         f3
Hrvoje> Sh-f6         Sh-f4
Hrvoje> Sh-f7         f5
Hrvoje> Sh-f8         f8
Hrvoje> Sh-f9         Sh-f7
Hrvoje> Sh-f10        f8
Hrvoje> Sh-f11        Sh-f11
Hrvoje> Sh-f12        Sh-f12

Hrvoje> I fail to see a pattern here -- but it may be just me.

Hrvoje> XEmacs 20.2 worked like this:

Hrvoje> Pressed:      C-h c reports:
Hrvoje> Sh-f1         f11
Hrvoje> Sh-f2         f12
Hrvoje> Sh-f3	      f13
Hrvoje> Sh-f4         f14
Hrvoje> ...

Hrvoje> Neither is correct, but the latter looks more consistent, if nothing.
Hrvoje> BTW, I run xf86 server on Linux as display, with XEmacs started on
Hrvoje> Solaris.

I modified x-win-xfree86.el to match my changes to the other keysym
functions.  The code is obvious, but untested, since I do not
currently have convenient access to a Linux console.

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]'

Here's the code:

;; 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" f13 f1)
    ("F14" f14 f2)
    ("F15" f15 f3)
    ("F16" f16 f4)
    ("F17" f17 f5)
    ("F18" f18 f6)
    ("F19" f19 f7)
    ("F20" f20 f8)
    ("F21" f21 f9)
    ("F22" f22 f10)
    ("F23" f23 f11)
    ("F24" f24 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)])
      )))

