|Sorry for so many posts :( - Simualte KeyEvent "!" character [message #534001]
||Mon, 17 May 2010 16:29
| Misha Koshelev
Registered: May 2010
My apologies per:|
"For key events that represent characters found in the Unicode character set, the character field is set to the matching (Unicode) char value. For example, when the user presses the <a> key, an SWT.KeyDown event is issued. The character field in this event has the (char) value a.
Despite the fact that SWT characters are just Java char values, convenience constants are provided for most common control characters, even those that have standard escape sequences (such as '\n' for linefeed). Programmers are free to use the constants (found in Table 2.4) or their equivalents."
I would imagine that:
Event event=new Event();
would send a '!' character, but it actually sends a 1.
Is there an easy way to convert characters to characters+modifiers so that it sends the correct character, or is this a bug?
Powered by FUDForum
. Page generated in 0.01913 seconds