On 02/20/2013 07:24 PM, Luke Yelavich wrote:
> Hey folks,
> I've been playing with QT 5 lately, testing out accessibility, and so far 
> thigs look pretty good. One thing I've noticed is that I cannot use Orca flat 
> review in Qt apps, which was also the case with Qt 4. So I've set about 
> trying to work out why this is. I initially thought it was due to Orca not 
> having a script to work with Qt apps, i.e a toolscript similar to the cally 
> and gail scripts, but I figured there was more to it than that. So far, I've 
> come to the conclusion that the app toolkit in use, i.e GTK has to implement 
> some form of key snooping to catch the appropriate keystrokes and send them 
> to atk/at-spi.

Well, I don't know if there is any relation between key events and the
flat review (Joanmarie is the one that could answer that).

But I can explain how the key events registering is implemented.

AT-SPI2 provide several methods to register to global events using X at
the implementation side. But the current status is somewhat broken,
because although mouse-events (AFAIK) works, key events using those are
not. Some of the reasons are the dead of the XEVIE module.

So, how we get those key events?:
  * ATK implementation at the server application needs to implement
atk-add-key-event-listener [1].
  * As usual, then the atk bridge expose that to at-spi2.

On GTK this method is implemented using a gtk key snooper [2]. On
clutter filtering the captured-event event at the stage.

But, as that atk bug says, this is not the best situation. As you can
see, this procedure means that the server application needs to capture
the key event and send it through DBUS, when ideally it would be better
to get that key event using a less indirect method, like asking X. Gtk
maintainers are really critical to this method, and in fact, key
snooping are officially deprecated, but only used for a11y purposes. It
is there because no one came to that X-based implementation (in fact
some X developers told us to keep doing this in this way [5]). Any kind
of help is welcome.

And in that sense, I'm not sure if Frederik Gladhorn implemented the Qt
equivalent for this ATK add-key-event-listener.

> Of course I may be missing part or all of the puzzle. So to be clear, I would 
> appreciate an explanation as to how the key snooping and key event trapping 
> for Orca keystrokes works.

That is something that you would need to ask to Orca developers. I just
explained how key events are captured right now.

BR

[1]
http://developer.gnome.org/atk/stable/AtkUtil.html#atk-add-key-event-listener
[2]
http://developer.gnome.org/gtk3/3.5/gtk3-General.html#gtk-key-snooper-install
[3]
http://developer.gnome.org/clutter/unstable/ClutterActor.html#ClutterActor-captured-event
[4] https://bugzilla.gnome.org/show_bug.cgi?id=649559#c2
[5]
http://blogs.igalia.com/apinheiro/2012/01/19/atkat-spi2-hackfest-2012-day-1/#comments

-- 
Alejandro Piñeiro Iglesias

_______________________________________________
gnome-accessibility-devel mailing list
gnome-accessibility-devel@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel

Reply via email to