GNOME Bugzilla – Bug 710106
power: Send Shift instead of Alt to reset the idle time on resume
Last modified: 2013-10-28 10:32:21 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
Created attachment 257258 [details] [review] power: Send Shift instead of Alt to reset the idle time on resume
Review of attachment 257258 [details] [review]: Using Shift might trigger accessibility features instead (such as ones available under Unity too). Choose your poison...
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.
What about Control or Ctrl+Alt? The combo shouldn't trigger nothing without any other keybinding.
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.
Isn't the point of this bug report that it does *not* work properly now?
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.
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.
(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