PDA

View Full Version : [CLOSED] NumberField keycode issue



fother
19 Mar 2009, 5:43 AM
I don't know if is my keyboard but, if locale equals pt_BR the decimal separator is ","..
when I press the key "," in numeric keyboard return the key code 124 and in "letters keyboard" return this key code 44

in numeric keyboard when I press the key 124 that represent "," the symbol is not insert in numeric field.. but if I press the key 44 that represent ",", the symbol insert ok

you understand? :))

sven
19 Mar 2009, 10:26 AM
Textcode is missing again.

fother
19 Mar 2009, 10:53 AM
but it simple.. add in gwt.xml that your application can use locale..
add only



NumberField field = new NumberField();

RootPanel.get().add(field);


set in url pt_BR and press the key "," in numeric keyboard.. you will see the problem.. why you move my other topic to the help?

sven
19 Mar 2009, 10:55 AM
Because that is the correct please for them.

fother
19 Mar 2009, 10:59 AM
sorry.. the translator don't help me... you can explain? other way.. you has success in reproduce this issue?

sven
19 Mar 2009, 10:59 AM
I am unable to reproduce this. Both return 44.

fother
19 Mar 2009, 10:59 AM
:-?

and now?

sven
19 Mar 2009, 11:01 AM
If it is an issue for you can easily override onkeypress of numberfield to get your behaviour

fother
19 Mar 2009, 11:03 AM
I do this :) but for other user's in brazil? here the keyboard has 124 keys..

fother
19 Mar 2009, 11:06 AM
you use this for test?



@Override
public void componentKeyPress(ComponentEvent event) {
super.componentKeyPress(event);

Window.alert(String.valueOf(event.getKeyCode()));

}

fother
19 Mar 2009, 11:07 AM
look at for this.. with num lock on return 124
and with num lock off return 46

:))

sven
19 Mar 2009, 11:14 AM
That will be normal. If numlook if of another key is represented.

Are you sure that you dont have any software installed that intefears with your keys?

fother
19 Mar 2009, 11:21 AM
no... lets me test in order SO

fother
19 Mar 2009, 11:40 AM
ok..

in linux.. return 124 and in windows return 44

I know that GXT don't support linux..

GXT appears Microsft :))

sven
19 Mar 2009, 11:42 AM
ok. So change your keyboard configuration on linux ;)

fother
19 Mar 2009, 11:45 AM
Here has 3 different linux SO, and the 3 return the same error... I think that you need change the source code.. and no that all users change the keyboard configuration :)

sven
19 Mar 2009, 11:47 AM
There is nothing we can change about that so easily.

fother
19 Mar 2009, 11:49 AM
ok.. so I will display the alert.. when the user press this key...

"you need change your keyboard layout" :))

I understand you.. ;)