Package: vnc-java
Version: 3.3.3r2-7
Severity: minor

Steps to reproduce:
1) start VNC, connect to it using vnc-java and start xev inside it
2) hit altgr

Expected results:
2) xev prints something along the lines of

KeyPress event, serial 25, synthetic NO, window 0x1800001,
    root 0x2e, subw 0x0, time 1497292417, (102,122), root:(167,711),
    state 0x0, keycode 255 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 25, synthetic NO, window 0x1800001,
    root 0x2e, subw 0x0, time 1497292522, (102,122), root:(167,711),
    state 0x0, keycode 255 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XLookupString gives 0 bytes: 


Actual results:
2) xev prints

KeyPress event, serial 28, synthetic NO, window 0xa00001,
    root 0x2e, subw 0x0, time 1497366784, (112,20), root:(177,365),
    state 0x0, keycode 107 (keysym 0xffff, Delete), same_screen YES,
    XLookupString gives 1 bytes: (7f) "^?"
    XmbLookupString gives 1 bytes: (7f) "^?"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0xa00001,
    root 0x2e, subw 0x0, time 1497367069, (112,20), root:(177,365),
    state 0x0, keycode 107 (keysym 0xffff, Delete), same_screen YES,
    XLookupString gives 1 bytes: (7f) "^?"
    XFilterEvent returns: False

so that altgr is interpreted as DEL which is clearly an error.

More info:
1) Since icedtea-gcjwebplugin seems to send 0xffff as keyid it seems
the issue can be fixed by extensing the already-in-place workaround by
one:

diff -urb vnc-java-3.3.3r2.orig/rfbProto.java vnc-java-3.3.3r2/rfbProto.java
--- orig/vnc-java-3.3.3r2/rfbProto.java 2008-07-25 08:02:07.000000000 +0000
+++ vnc-java-3.3.3r2/rfbProto.java      2008-07-25 08:02:26.000000000 +0000
@@ -572,7 +572,7 @@
        } else {
          // JDK1.1 on X incorrectly passes some keysyms straight through, so
          // we do too.  JDK1.1.4 seems to have fixed this.
-         if ((key < 0xff00) || (key > 0xffff))
+         if ((key < 0xff00) || (key >= 0xffff))
            return;
        }
       }
diff -urb vnc-java-3.3.3r2.orig/rfbProto.java vnc-java-3.3.3r2/rfbProto.java
--- orig/vnc-java-3.3.3r2/rfbProto.java	2008-07-25 08:02:07.000000000 +0000
+++ vnc-java-3.3.3r2/rfbProto.java	2008-07-25 08:02:26.000000000 +0000
@@ -572,7 +572,7 @@
 	} else {
 	  // JDK1.1 on X incorrectly passes some keysyms straight through, so
 	  // we do too.  JDK1.1.4 seems to have fixed this.
-	  if ((key < 0xff00) || (key > 0xffff))
+	  if ((key < 0xff00) || (key >= 0xffff))
 	    return;
 	}
       }

Reply via email to