Work with NumPad in VT emulations

Desired Behavior:

The behavior of the NumPad 0 ... 9 keys is determined by the keypad parameter value (Numeric or Application) in the terminal setup. The behavior is identical for the specified key in either NumLock state for the same keypad Type.

 JVM Undesirable Behavior:

NumLock state

 Behavior

On

The Java Virtual Machine sends the different codes for the NumPad 0 key and for the 0 key. Therefore, the Java program can identify which key was pressed.

Off

The Java program has no way to distinguish which key was pressed: i.e. NumPadEnd or End, because JVM produces the same code for both of them.

Our recommendations: