<AWT Dev>  JDK-8218917: KeyEvent.getModifiers() returns inconsistent values for ALT keys
malenkov at gmail.com
Tue Mar 12 19:50:43 UTC 2019
The AltGr is actively used with some locales to enter national
characters on Windows and Linux. Also it is used to enter some special
symbols. See http://en.wikipedia.org/wiki/AltGr_key
Someone may want to connect a classic keyboard to MacMini and
configure the right Alt key to behave like AltGr. But this key should
work as usual by default.
My change fixes other issues like processing both modifier keys with
the same key code and with different location at the same time. But it
is easy to modify it and remove AltGr supporting. For example,
On Tue, Mar 12, 2019 at 3:37 AM Philip Race <philip.race at oracle.com> wrote:
> The debate is about AltGraph which an ancient MS-DOSism for
> asking for an ALTernate GRAPHics bitmap font - all pre-dates windows
> and I am sure has never been applicable to any MacOS.
> So someone needs to properly explain why we would claim a Mac keyboard
> is OK to generate a keycode it doesn't have and cause a slew of regressions
> in the process ...
> If Mac doesn't distinguish these two, we should generate the same
> keycode for both.
> One could suppose there is a difference else why two keys, but what is
> the right
> thing to do here that fixes all the problems. What exactly WAS the problem
> with what was there in the first place ? And if changing it is correct
> why is it
> causing regressions ?
> On 3/12/19, 5:34 AM, Sergey Bylokhov wrote:
> > Hi, Phil.
> > On 11/03/2019 07:43, Philip Race wrote:
> >> The reasoning that AltGraph might be useful to someone is a bit weak
> >> and I don't think I'd want to support it via system property or build
> >> options.
> >> If its not a platform keyboard key, why do we need it ?
> > The "AltGraph" key is also commonly referred to as "Right Alt", and
> > it has been implemented on all platforms as a "Right Alt", it is
> > convenient to
> > distinguish the left/right alts.
Sergey A. Malenkov
More information about the awt-dev