After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698746 - Accessibility : "slow keys" breaks "screen keyboard" feature
Accessibility : "slow keys" breaks "screen keyboard" feature
Status: RESOLVED FIXED
Product: caribou
Classification: Applications
Component: default
git master
Other Linux
: Normal normal
: ---
Assigned To: caribou-maint
caribou-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-24 14:52 UTC by Philippe "RzR" Coval
Modified: 2014-01-03 15:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
caribou-slowkeys.patch (3.71 KB, patch)
2013-10-23 13:02 UTC, manuel.BACHMANN@eurogiciel.fr
needs-work Details | Review
Makes "screen keyboard" works with "slow keys" feature enabled. (4.40 KB, patch)
2013-10-31 14:43 UTC, Kévin THIERRY
none Details | Review
xadapter: disable slowkeys when sending key event (3.42 KB, patch)
2013-11-01 03:07 UTC, Daiki Ueno
committed Details | Review

Description Philippe "RzR" Coval 2013-04-24 14:52:22 UTC
If you set both on none will be usable at all

Only the pointer to disable one of them

Tested on fedora base (gnome-3.8.0) ...

May investigate later, If none cares
Comment 1 Ewan.LEBIDEAU-CANEVET 2013-06-05 09:10:32 UTC
If slow keys and screen keyboard are set to on in universal acces, the screen keyboard is unusable but the slow keys are still working
Comment 2 Ewan.LEBIDEAU-CANEVET 2013-06-05 09:17:36 UTC
(In reply to comment #1)
> If slow keys and screen keyboard are set to on in universal acces, the screen
> keyboard is unusable but the slow keys are still working
(Fedora beta 19  http://fedoraproject.org/fr/download-splash?file=http://download.fedoraproject.org/pub/fedora/linux/releases/test/19-Beta/Live/x86_64/Fedora-Live-Desktop-x86_64-19-Beta-1.iso)
Comment 3 Kévin THIERRY 2013-10-16 14:01:57 UTC
Bug still present in gnome 3.10 (tested in Fedora 20).
Comment 4 manuel.BACHMANN@eurogiciel.fr 2013-10-23 13:02:20 UTC
Created attachment 257915 [details] [review]
caribou-slowkeys.patch

Hello,

Please consider attached patch, which solves the problem by deactivating X slow keys features, each time the virtual keyboard sends a keystroke.
Comment 5 manuel.BACHMANN@eurogiciel.fr 2013-10-25 11:23:00 UTC
Precision : patch was made with caribou-0.4.11 (ftp://ftp.gnome.org/pub/GNOME/sources/caribou/0.4/caribou-0.4.11.tar.xz) used by gnome-shell 3.8.
Comment 6 tarnyko 2013-10-28 10:02:28 UTC
Just tested, patch works with git master, too.
Comment 7 Kévin THIERRY 2013-10-28 10:04:02 UTC
Patch works fine for me (tested on Fedora 20).
Comment 8 Daiki Ueno 2013-10-29 08:19:07 UTC
Review of attachment 257915 [details] [review]:

Thanks, patch looks fine.

::: libcaribou/xadapter.vala
@@ +95,3 @@
+           if (this.a11y_settings.get_boolean ("slowkeys-enable") == true) {
+               if (enable == false)
+                 this.xkbdesc.ctrls.enabled_ctrls = this.xkbdesc.ctrls.enabled_ctrls & ~Xkb.SlowKeysMask;

this.xkbdesc.ctrls.enabled_ctrls &= ~Xkb.SlowKeysMask; for simplicity

@@ +277,3 @@
                 mod_latch (mask);
 
+            trigger_slowkeys (false);

"trigger" looks a bit misleading here.  It sounds like the function proactively enable the slow keys, even though the argument is false.  Maybe:

disable_slowkeys ();
XTest.fake_key_event (...);
enable_slowkeys ();

might make the logic a bit clearer?

@@ +103,3 @@
     public class Controls {
+        public uint		enabled_ctrls;
+        public uint		axt_ctrls_mask;

Other fields than enable_ctrls can be omitted.
Comment 9 Daiki Ueno 2013-10-29 13:51:59 UTC
Perhaps we don't even need to check the a11y settings here.  If we had a function, say, set_slow_keys_enabled, which returns the previous value of (enable_ctrls & SlowKeysMask) == 0, we could write:

var slow_keys_enabled = set_slow_keys_enabled (false);
XTest.fake_key_event (...);
set_slow_keys_enabled (slow_keys_enabled);
Comment 10 manuel.BACHMANN@eurogiciel.fr 2013-10-30 13:16:19 UTC
(In reply to comment #8)
Hello Daiki and thanks for your review,

> "trigger" looks a bit misleading here.  It sounds like the function proactively
> enable the slow keys, even though the argument is false.  Maybe:
> 
> disable_slowkeys ();
> XTest.fake_key_event (...);
> enable_slowkeys ();
> 
> might make the logic a bit clearer?
> 

Yes, having 2 functions sounds fine.

> Other fields than enable_ctrls can be omitted.

My bad, these are leftovers from my initial tests. They could eventually become useful in the future, though.

(In reply to comment #9)
> Perhaps we don't even need to check the a11y settings here.  If we had a
> function, say, set_slow_keys_enabled, which returns the previous value of
> (enable_ctrls & SlowKeysMask) == 0, we could write:
> 
> var slow_keys_enabled = set_slow_keys_enabled (false);
> XTest.fake_key_event (...);
> set_slow_keys_enabled (slow_keys_enabled);

Smart, should be faster, looks good to me !
Comment 11 Kévin THIERRY 2013-10-31 14:43:25 UTC
Created attachment 258653 [details] [review]
Makes "screen keyboard" works with "slow keys" feature enabled.

Manuel's patch with Daiki Ueno modifications.
Comment 12 Daiki Ueno 2013-11-01 02:53:39 UTC
(In reply to comment #11) 
> Manuel's patch with Daiki Ueno modifications.

Thanks.  However, in that case, set_slow_keys_enabled needs to call Xkb.get_controls to retrieve the latest controls from the server.

I'll attach a slightly modified version.
Comment 13 Daiki Ueno 2013-11-01 03:07:42 UTC
Created attachment 258712 [details] [review]
xadapter: disable slowkeys when sending key event
Comment 14 Kévin THIERRY 2013-11-04 09:01:51 UTC
Works for me.
Comment 15 Daiki Ueno 2013-11-05 01:54:45 UTC
Attachment 258712 [details] pushed as 6c75e02 - xadapter: disable slowkeys when sending key event
Comment 16 manuel.BACHMANN@eurogiciel.fr 2013-11-05 08:04:56 UTC
That's very nice !

Do you think it would be possible to push it to 4.11, eventually ?
Comment 17 Daiki Ueno 2013-11-06 09:45:10 UTC
Sure, will make a release for 3.11.2 unstable.
Comment 18 Philippe "RzR" Coval 2014-01-03 15:46:38 UTC
I confirm caribou 0.4.13 is working fine on gnome-3-8 base 

BTW it would make sense to have a gnome-3-8 branch on this project too...

Thank you all