Bug in IRIS-client preventing keystrokes from mac osx user

19 views
Skip to first unread message

dustin...@crc-corp.com

unread,
Jan 22, 2019, 6:15:21 PM1/22/19
to IRIS ATMS
Greetings,

Locally i've patched the following code to allow input from a mac osx user running the iris-client.

iris-client/src/main/java/us/mn/state/dot/tms/client/toolbar/CamSelectPanel.java

FROM:

public boolean dispatchKeyEvent(KeyEvent e) {

if (tk.getLockingKeyState(KeyEvent.VK_NUM_LOCK)) {

pressed = false;

return false;

}




TO:

public boolean dispatchKeyEvent(KeyEvent e) {

   if (e.getID() == KeyEvent.KEY_PRESSED) {

if (e.getKeyCode() == KeyEvent.VK_NUM_LOCK) {

pressed = false;

return false;

}

}


Without this patch, an exception is thrown on the client with every key stroke entered.

Exception in thread "AWT-EventQueue-2" java.lang.UnsupportedOperationException: Toolkit.getLockingKeyState

at sun.lwawt.macosx.LWCToolkit.getLockingKeyState(LWCToolkit.java:442)

at us.mn.state.dot.tms.client.toolbar.CamSelectPanel$KeyDispatcher.dispatchKeyEvent(Unknown Source)

at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1097)

at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:974)

at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:800)


Any way we can get this merged into the mainline?

Reply all
Reply to author
Forward
0 new messages