Skip to content

Commit 84ea1a2

Browse files
committed
JSTextUI update
1 parent ba167cc commit 84ea1a2

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20241123180856
1+
20241128160622
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20241123180856
1+
20241128160622
Binary file not shown.

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSTextUI.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,8 +1389,6 @@ else if (type == "keyup")
13891389
handleCtrlV(KeyEvent.KEY_RELEASED);
13901390
return NOT_CONSUMED;
13911391
case KeyEvent.VK_A: // a
1392-
if (!isCTRL)
1393-
return null;
13941392
return null;
13951393
// allowKeyEvent(jQueryEvent);
13961394
// return NOT_CONSUMED; // allow standard browser CTRL-C, with no Java-Event processing
@@ -1402,18 +1400,24 @@ else if (type == "keyup")
14021400

14031401
case KeyEvent.VK_TAB:
14041402
return handleTab(jQueryEvent, type);
1405-
case KeyEvent.VK_HOME:
1406-
case KeyEvent.VK_END:
14071403
case KeyEvent.VK_UP:
14081404
case KeyEvent.VK_DOWN:
1409-
case KeyEvent.VK_LEFT:
1410-
case KeyEvent.VK_RIGHT:
1405+
// Jmol needs to catch these
1406+
return null;
14111407
case KeyEvent.VK_PAGE_UP:
14121408
case KeyEvent.VK_PAGE_DOWN:
1409+
// unfortunately, these CTRL-PAGE_UP and CTRL-PAGE_DOWN
1410+
// cannot be stopped in a browser from switching tabs
1411+
case KeyEvent.VK_HOME:
1412+
case KeyEvent.VK_END:
1413+
case KeyEvent.VK_LEFT:
1414+
case KeyEvent.VK_RIGHT:
14131415
case KeyEvent.VK_KP_UP:
14141416
case KeyEvent.VK_KP_DOWN:
14151417
case KeyEvent.VK_KP_LEFT:
14161418
case KeyEvent.VK_KP_RIGHT:
1419+
// BH 2024 - I don't understand why I did this
1420+
// BH 2024 - removed VK_UP and VK_DOWN from this list
14171421
// accept only if neither ALT nor CTRL is down
14181422
return (/** @j2sNative jQueryEvent.altKey || */
14191423
isCTRL ? CONSUMED : null);

0 commit comments

Comments
 (0)