JDK-4033894 : Keyboard driven scrolling is broken in Motif ScrollPanes.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.1
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 1997-02-22
  • Updated: 2002-07-24
  • Resolved: 2002-07-24
Related Reports
Relates :  
Relates :  
Description
The arrow keys and pgup/pgdwn keys don't appear to map to their respective
scrolling operations.  When running hotjava, use of these keys causes
alphanumeric info to appear in the locator window, for example.  I'm not
sure that I've correctly categorized this bug.

allan.jacobs@Eng 1998-03-27

JavaSoft JDK 1.2 build L (beta3) fails JCK-12beta2 test 
javasoft.sqe.tests.api.java.awt.interactive.Scrollbar.ScrollbarTests
with "-TestCaseID ScrollbarTest0002".  Keyboard arrow keys, PgUp, and
PgDn have no effect on vertical scrollbars.  Horizontal scrollbars respond
to keyboard events.



allan.jacobs@Eng 1998-03-31
I tried the test again and can't reproduce the problem in JDK 1.2 build L.

Comments
EVALUATION Could this be that they haven't requested focus? Anyway, I tried the following test case, and it seems difficult to get the focus on scrollbar. But once the scrollbar got the focus, the arrow keys function correctly. xianfa.deng@Eng 1997-11-25 import java.awt.*; import java.awt.event.*; public class test extends Frame implements AdjustmentListener { public static void main(String argv[]) { test t = new test(); t.show(); t.setSize(20,60); } class myKeyEvent extends KeyAdapter { public void keyPressed(KeyEvent e) { System.out.println("Key in scrollbar = "+e.getKeyChar()); } } public test() { // Scrollbar sb = new Scrollbar(Scrollbar.HORIZONTAL,0,10,0,100); Scrollbar sb = new Scrollbar(Scrollbar.VERTICAL,0,1,-2,2); add("West", sb); sb.addAdjustmentListener(this); sb.addKeyListener(new myKeyEvent()); Label l = new Label("This is a label"); add("North", l); l.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { System.out.println("Key in lable = "+e.getKeyChar()); } }); } public void adjustmentValueChanged(AdjustmentEvent e) { System.out.println("Value="+e.getValue()); } } ========================================================================= eric.hawkes@eng 1998-05-04 The following comments are based on tests using JDK1.2beta4-D. The bug report for 4033894 has a lot of comments from engineers saying they can't reproduce it. The reason for this is that it is really several different problems that manifest under different circumstances. 1) Scrollbars can't move unless the cursor is over the scrollbar. This is because keyEvents don't get passed to a Component unless the mouse cursor is directly over it - even if it has the focus. 2) Once a scrollbar loses focus to another Component or to another window, it can never get it back. It CAN get it back if it loses focus to another scrollbar in the same frame, however. 3) The distinct PageUp, PageDown, Home, and End keys are not generating action events, but the numpad versions of these keys are. This should be seen in jdk1.2 only. 4) The bug manifests differently under different window managers. Under dtwm, the bug behaves something like the description by the submitter: hotjava will not respond to keyboard-driven scrolling at first, but placing the focus in the URL textfield enables vertical (but not horizontal) scrolling. Under fvwm, keyboard-driven scrolling simply cannot be enabled. Problems #1 and #2 have been around for over a year (first reported against JDK1.1.1). Jeff Dunn and I spent a little time on them a few months ago, and didn't get anywhere. See 4041703. Problem #3: not sure if a fix is desired. There has been some dispute about this in the past, and the JDK is currently in an inconsistent state (see bugids 4106941 and 4087898/4087994): JDK1.2 is different than 1.1 (possibly approved by the CCC) and win32 works differently than Solaris. This part, at least, should be resolved by FCS, if possible. Problem #4 Possibly caused by different widgets getting the events under different window managers. =============================================================================== All the issues highlighted here is present as of JDK 1.3RA under Sun4 Solaris 2.7. sandeep.konchady@Eng 1999-12-02 Name: dsR10078 Date: 07/03/2001 Reproducible with merlin b70 on Solaris and WinNT: javasoft.sqe.tests.api.java.awt.interactive.Scrollbar.ScrollbarTests and the test case in Evaluation field demonstrate that scrollbars doen't respond to arrow keys. ###@###.### 2001-07-02 ====================================================================== Name: dmR10075 Date: 07/24/2002 The bug is not reproducible in Hopper b16. Problem #1 & #2 had been fixed by Merlin focus redesign. Problem #3 had been fixed somewhen. Also by the fix for 4027897 Scrollbar was made to be able to receive focus and thus be able to be controlled by keyboard. ###@###.### 2002-07-24 ======================================================================
24-07-2002