Re: [g-a-devel] generateKeyboardEvent Patch for Java Access Bridge
- From: Bill Haneman <Bill Haneman Sun COM>
- To: Matt Wringe <mwringe gmail com>
- Cc: gnome-accessibility-devel gnome org
- Subject: Re: [g-a-devel] generateKeyboardEvent Patch for Java Access Bridge
- Date: Tue, 29 Mar 2005 18:25:37 +0100
Matt Wringe wrote:
...
You should not use X keycodes or X keysyms in a Java application; you
should use the Java-equivalent codes, or use the 'string' version of the
key event APIs.
Yes, thats my problem I can't find any java equivalent code to return
keycodes or keysyms.
For keysyms, I found java code in java-gnome (see previous message)
that would return them, and I also found that the awt KeyEvent can
also return them (although only for the capitalized character). But
this is really not a proper way of doing it.
Correct. You shouldn't do this.
For keycodes, wont any java code that return them have to communicate
with X? Its my understanding that keycodes change depending on what
keyboard is plugged in (I could be wrong). So, essentially the java
program will have to return the X keycodes. Right?
I am doubtful.
You are right that I could just use just be using strings instead of
keysyms or keycodes, if I was just trying to mimic a single keypress.
But to generate more complex keyboard events (ie ctrl alt R), you
would need to use keycodes (cause they are the only ones with key
press and release capabilities).
If you have any idea what the proper way of getting keycodes or
keysyms in java is, could you please let me. Any help on this would be
greatly appreciated.
I'll have another look at the implementation, to see if there is
something better that we can do. I do wonder, however, why a Java
application, even an assistive technology, needs to synthesize specific
keycode sequences. What are you trying to do, again?
- Bill
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]