NumLock

Maurizio DE CECCO maurizio at mandrakesoft.com
Tue Apr 11 10:31:53 PDT 2000



I have a problem with Num-locked keypads.

In kaffe, text components do not respond to numbers typed
on the Keypad with Num Lock on.

The Sun jdk1.2.2 does respond, so you can you the keypad to fill
up numeric input fields.

OK, simple until here.

So, i thought: lets fix the evt.c file in kaffe to produce the VK_NUMPAD0 .. VK_NUMPAD9
keycodes with the keypad, and possibly the text components to insert the proper number.

Easy (ehm, almost .. :-) .. i played a little bit with evt.c and got this result, but
before going on, i tryed to understand more precisely what happens on the Sun 1.2.2;
for example, should a KeyTyped event be generated ? 

I installed a KeyListener on a textfield and played around a little bit; and i don't
understand the result; the result is that the above keycodes are not generated,
the KeyEvent have zero modifiers, either with NumLock on or off.

So the questions are:
   1- What should be the right behaviour with NumLock'ed numbers ?
   2- How the Sun 1.2.2 works ? How their AWT TextField decide to insert
      the number ?

Anybody can help ?

Maurizio

-- 
Maurizio De Cecco
MandrakeSoft 		http://www.mandrakesoft.com/


More information about the kaffe mailing list