KeyReleased Bug

After the last Java update on OSX (several months ago now), all my keyboard handlers stopped working correctly in applets. Seems a lack of KeyRelease.

What I’ve been using for quite a few years in Java4k (Ok, depreciated handler and horrible to read, but it is small)


    /** Process Keyboard and Mouse Events */
    @Override
    public boolean handleEvent(Event e) {
        switch((e.id-1)|1) {
            case java.awt.Event.KEY_PRESS:
            case java.awt.Event.KEY_ACTION:
                keyboard[e.key] = (e.id&1)==1;
                return true;
            default:
        }
        return false;
    }

Sadly, now the keys now just stick on. I had a look at other people’s applets on Java4k and similar problems all over. So, I thought, it’s broken, but another Java release will come along real soon now. Only it hasn’t. So, do other people have this problem (on OSX) or is it just me.

Edit: This is using latest safari - could be it isn’t passing on KeyRelease?

  1. Make a simple program to debug, try it on desktop and applet
  2. If both of them fail, blame Apple and Oracle.
  3. Else if only the applet who fails, try with other browsers
  4. If works on other browser, blame Safari team and oracle. If no blame Apple and Oracle.
  5. Nothing work, blame Apple and Oracle.

Problem also in Firefox

There’s a few threads on stack exchange too, but no full blown hue and cry. Probably no one writes java applets now?