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 710106 - power: Send Shift instead of Alt to reset the idle time on resume
power: Send Shift instead of Alt to reset the idle time on resume
Status: RESOLVED WONTFIX
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-10-14 14:05 UTC by Iain Lane
Modified: 2013-10-28 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Send Shift instead of Alt to reset the idle time on resume (1.78 KB, patch)
2013-10-14 14:05 UTC, Iain Lane
rejected Details | Review

Description Iain Lane 2013-10-14 14:05:15 UTC
In some environments, notably Unity with the HUD, alt might perform an
actual action. Shift is less likely to do so.

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1227920
Comment 1 Iain Lane 2013-10-14 14:05:18 UTC
Created attachment 257258 [details] [review]
power: Send Shift instead of Alt to reset the idle time on resume
Comment 2 Bastien Nocera 2013-10-14 14:07:09 UTC
Review of attachment 257258 [details] [review]:

Using Shift might trigger accessibility features instead (such as ones available under Unity too). Choose your poison...
Comment 3 Iain Lane 2013-10-14 14:16:27 UTC
Which?

I know about pressing the shift key 5 times in a row, or holding it down for x (8?) seconds to trigger a11y, but those seem quite unlikely to get in the way here.
Comment 4 Marco Trevisan (Treviño) 2013-10-14 16:56:04 UTC
What about Control or Ctrl+Alt? The combo shouldn't trigger nothing without any other keybinding.
Comment 5 Bastien Nocera 2013-10-21 21:19:57 UTC
I'd rather not change something that works now. Bug 709069 is about the compositor providing us with that functionality, which is my favoured option should this code ever be changed.
Comment 6 Sulphur 2013-10-23 18:11:27 UTC
Isn't the point of this bug report that it does *not* work properly now?
Comment 7 Bastien Nocera 2013-10-23 20:53:56 UTC
It works correctly in GNOME, which is gnome-settings-daemon's target... If something else is needed to make it work under Unity, you can patch it downstream.
Comment 8 Jim Avera 2013-10-28 00:08:05 UTC
I respectfully disagree that this is not a bug in GNOME.

Not because the "wrong" key-press is being injected, but because the mechanism is architecturally flawed and should be re-worked to not require key-press injection.  Instead, an explicit API should be created to reset the timer; alternatively, if there is a single library which *reads* the timer, then that thingie could be told to subtract an offset to effectively ignore the time spent sleeping.  Or something which doesn't require masquerading as the user to type something.

*No* key-press is guaranteed to not have any semantics -- anything GNOME types for the user may legitimately trigger something affecting the user.  Therefore GNOME shouldn't ever do that. 

Short-term workaround: Until a proper mechanism is implemented (not involving key-press injection), GNOME should pick the least-problematic key.  From comments from others, it sounds like Left-Shift, removed in less than 1/2 second, is safe from triggering screen-readers etc. and is least likely to conflict with special-purpose key mappings.  After all, everybody has to use the shift key to type upper-case letters!  Whereas Alt and so-forth are frequently overloaded for special purposes.   Another possibility is to press CapsLock (and relase), twice.
Comment 9 Bastien Nocera 2013-10-28 10:32:21 UTC
(In reply to comment #8)
> I respectfully disagree that this is not a bug in GNOME.
> 
> Not because the "wrong" key-press is being injected, but because the mechanism
> is architecturally flawed and should be re-worked to not require key-press
> injection.

You're preaching to the choir. See comment 5. See also:
https://bugs.freedesktop.org/show_bug.cgi?id=59576