Subject: bug#4782: 23.1; (win32) emacs doesn't receive AltGr from synergy

From: fperrin <[email-masked]>
Date: Thu, 22 Oct 2009 10:01:52 +0200

Hello,

At work I have to computers, a workstation running Scientific GNU/Linux
and a Windows XP laptop. For my own comfort, I use synergy to share my
workstation's keyboard between the two computers. The synergy server runs
on my workstation, the client on the laptop.

On a (French) AZERTY keyboard, the modifiers available are Ctrl (left and
right), Alt (on the left of the spacebar) and AltGr (on the right of the
spacebar). In order to enter characters such as \, you have to press
AltGr-_ (this key is _ without modifiers, 8 when shifted, \ when used with
AltGr).

I don't know how relevant it is, but under Win32, some (not all)
applications will accept Alt+Ctrl as a substitute for AltGr (e.g. using
M-C-_ under Firefox will produce \ ; it doesn't under Outlook).

When I use emacs on the laptop, with my workstation keyboard shared with
synergy, when I type AltGr-_ I get the message "C-M-_ is undefined". When
using another application (notepad.exe or Firefox), when I type AltGr-_, I
get (as expected) a \ character. If I use my laptop's keyboard with emacs
or another application, when I type AltGr-_, I get (as expected) a \
character.

AltGr works as expected (even through synergy) with other applications,
that is why I report this as an emacs bug.

I use the following software stack:

On the workstation:

$ lsb_release -a
LSB Version:   
:core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: ScientificSL
Description:    Scientific Linux SL release 5.2 (Boron)
$ uname -a
Linux frlanw0f03384 2.6.18-128.4.1.el5PAE #1 SMP Tue Aug 4 13:16:50 EDT
2009 i686 i686 i386 GNU/Linux
$ grep '^X ' < /var/log/Xorg.0.log
X Window System Version 7.1.1
X Protocol Version 11, Revision 0, Release 7.1.1
$ gnome-about --version
Gnome gnome-about 2.16.0

Synergy was installed from the binary package synergy-1.3.1-1.i386.rpm
available on their website.

The keyboard is defined in xorg.conf by:
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "fr"
EndSection

(gnome-keyboard-properties shows the same thing: Generic 105-key intl PC,
with layout France Alternaative.

I don't have root on this workstation.

The keyboard I use is a standard-looking vanilla hp keyboard, with 105
keys much like
<http://www.keytronic.com/home/products/specs/63471-1_FR.gif>.

On the Windows laptop:

Windows XP, with service pack 2, emacs as described below. In the "Service
de texte et langues d'entrée" dialog (Text and input language
service?) only French is defined as an input method, and hot keys to
switch input methods are disabled. If necessary, I do have administrative
rights on the Windows laptop.

In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)  of 2009-07-30 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured
using `configure --with-gcc (4.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: FRA
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: PS

Minor modes in effect:
  desktop-save-mode: t
  show-paren-mode: t
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

--
Frédéric Perrin
frederic.perrin@{Alcatel-Lucent.com,resel.fr}