Bug 738080

Summary: Some Win+key (Mod4+key, Super+key) keyboard shortcuts do not work
Product: [Fedora] Fedora Reporter: Michal Ambroz <rebus>
Component: gnome-shellAssignee: Owen Taylor <otaylor>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 22CC: browning48ky, bugzilla.redhat, dtardon, fedora, jik, maxamillion, maxx, otaylor, samkraju, silfreed, stijn, walters
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 20:24:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Screenshot-Keyboard.png
none
Keyboard Shortcuts settings Fedora 17 none

Description Michal Ambroz 2011-09-13 20:34:11 UTC
Description of problem:
It seems that some of the gnome-shell keyboard shortcuts using the value containing the Win key (Mod4) will not work. 
Mod4 probably works for old metacity keyboard shortcuts, but it doesn't work for the new gnome3 style shortcuts.

From the "System Settings/Keyboard/Shortcuts" (gnome-control-center) the only the shortcuts using the old metacity gconf resources seems to work. For example "Launch Terminal" , "Hide all normal windows", "Take a screenshot".
Setting for example <Mod4>T will work for running the terminal when Win+T is pressed.

This is equivalent of setting:
$ gconftool-2 -s /apps/metacity/global_keybindings/run_command_terminal --type=string '<Mod4>t'
$ gconftool-2 -s /apps/metacity/global_keybindings/show_desktop --type=string '<Mod4>d'


Setting for other keyboard shortcuts is possible in gui, but it is ignored. For example setting "Launch web browser" to <Mod4>f doesn't work. Same for the "Lock Screen".
This is equivalent of setting:
$ gsettings set org.gnome.settings-daemon.plugins.media-keys www '<Mod4>f'
$ gsettings org.gnome.settings-daemon.plugins.media-keys screensaver '<Mod4>l'


Version-Release number of selected component (if applicable):
gnome-shell-3.0.2-4.fc15.i686
mutter-3.0.2.1-1.fc15.i686
metacity-2.34.0-2.fc15.i686
control-center-3.0.1.1-6.fc15.i686

How reproducible:
100%

Steps to Reproduce:
1. run commands (or do the same in gnome-control-center gui)
gconftool-2 -s /apps/metacity/global_keybindings/run_command_terminal --type=string '<Mod4>t'
gsettings set org.gnome.settings-daemon.plugins.media-keys www '<Mod4>f'
gsettings org.gnome.settings-daemon.plugins.media-keys screensaver '<Mod4>l'

2. Press Win key + t, Win key + f, Win key + l 

  
Actual results:
Only new terminal is started.

Expected results:
New terminal should be started for Win+t.
New browser window should be started for Win+f.
Screen should be locked for Win+l.

Additional info:
Workaround is to set the desired functions using the old metacity gconf resources for example:
gconftool-2 -s /apps/metacity/global_keybindings/run_command_1 --type=string '<Mod4>f'
gconftool-2 -s /apps/metacity/keybinding_commands/command_1 --type=string 'firefox'
gconftool-2 -s /apps/metacity/global_keybindings/run_command_2 --type=string '<Mod4>l'
gconftool-2 -s /apps/metacity/keybinding_commands/command_2 --type=string 'gnome-screensaver-command -l'

Comment 1 Michal Ambroz 2011-09-13 20:36:46 UTC
Created attachment 523000 [details]
Screenshot-Keyboard.png

Comment 2 Michal Ambroz 2012-03-18 01:56:06 UTC
Created attachment 570856 [details]
Keyboard Shortcuts settings Fedora 17

Keyboard Shortcuts settings Fedora 17

Comment 3 Michal Ambroz 2012-03-18 01:59:10 UTC
With Fedora 17 Alfa even the workaround stopped working.

In the Keyboard Shortcuts screent it is possible to set for example for starting web browser with Win+F (Super+F), but the setting will not work.

Michal Ambroz

Comment 4 Michal Ambroz 2012-03-18 13:44:45 UTC
Filled bug upstream on gnome bugzilla:
https://bugzilla.gnome.org/show_bug.cgi?id=672343

Comment 5 Owen Taylor 2012-04-20 16:07:11 UTC
This is

Comment 6 Michal Ambroz 2012-05-31 18:58:23 UTC
Upstream bug https://bugzilla.gnome.org/show_bug.cgi?id=662580

Comment 7 Fedora End Of Life 2013-07-04 05:26:14 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Jonathan Kamens 2013-07-08 01:59:14 UTC
Still broken in F18. Can't even set the shortcuts through the GUI.

Comment 9 Fedora End Of Life 2013-12-21 08:28:47 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Jonathan Kamens 2013-12-22 01:46:27 UTC
This appears to still be broken in Fedora 20, in two different ways:

1. When I go into the keyboard shortcuts control panel and attempt to set Windows-Key-L to the lock screen shortcut, as soon as I hit the windows key in sets the shortcut to "Level3 Shift" without letting me enter the L. I.e., I don't think it's treating the key as a modifier key.

2. When I do "gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver '<Mod4>l'", it sets the shortcut (according to the control panel) to "Mod4+Super+Hyper+L", and Windows-Key-L still doesn't lock the screen.

The referenced GNOME bug claims to be fixed in gnome-shell 3.8, but that fix does not seem to have propagated in a meaningful way to Fedora 20.

Comment 11 Ryan Lerch 2014-12-05 15:26:44 UTC
THis issue has been fixed upstream in GNOME, and now works correctly for me in Fedora 20 (with GNOME 3.12) and on Fedora 21.

If you are still experiencing this issue on Fedora 21, feel free to reopen this bug.

Comment 12 Jonathan Kamens 2014-12-13 16:11:28 UTC
(In reply to Ryan Lerch from comment #11)
> THis issue has been fixed upstream in GNOME, and now works correctly for me
> in Fedora 20 (with GNOME 3.12) and on Fedora 21.

<confused>How do I get GNOME 3.12 in Fedora 20?</confused>

Comment 13 Jonathan Kamens 2014-12-14 00:36:19 UTC
NVM the Fedora 20 question. I've upgraded to Fedora 21, and I am still unable to set the shortcut for lock screen to <Mod4>l. Both of the problems I described in comment 10 persist.

If it "now works correctly for [you]" as per comment 11, can you please describe exactly WHAT works correctly and HOW? I.e., using my simple example from comment 10, how can I set the key sequence <Mod4>l to lock the screen?

Thanks.

Comment 14 Christian Stadelmann 2014-12-14 10:58:49 UTC
I can confirm that your simple example in comment 11 works for me:
1. I can set shortcuts starting with <super>, e.g. <super+L> for locking the screen.
2. org.gnome.settings-daemon.media-keys screensaver is set to '<Mod4>l'
I am working on F21 workstation, GNOME 3.14. I had a similiar issue with GNOME 3.13 but this one was fixed.

Comment 15 Jonathan Kamens 2014-12-14 12:11:46 UTC
Fascinating. I'm on Fedora 21 and I see entirely different behavior.

When you run xev, put your mouse over the xev window, and hit your Mod4 key, what does xev say the key is? For me, it says it's, "ISO_Level3_Shift".

Comment 16 Christian Stadelmann 2014-12-14 13:20:35 UTC
comment #15:
the xev window does not even get the <super> key, only gnome-shell seems to get it. using
$ xinput test
works fine and gives me key ID 133.
Do you use any special keyboard layouts?

Comment 17 Jonathan Kamens 2014-12-14 16:15:08 UTC
xinput test on my keyboard also gives me key ID 133 for the Windows key.

I am not, as far as I know, using any special keyboard layout. I'm not sure how to integrate GNOME to find out if I've got something configured that I don't know or have forgotten about.

The Keyboard control panel says my Language is "English (United States), Formats are "United States (English), and Input Sources is "English (US)". The keyboard in question is a CM Storm QuickFire Rapid keyboard, though I'm not sure that's relevant since as noted above I'm seeing the same key ID as you.

Comment 18 Jonathan Kamens 2014-12-14 16:35:51 UTC
Digging down further into this, "xmodmap -pm" says that Super_L and Hyper_L are mapped to mod4, but the keyboard map that I get by going to the Keyboard control panel, then "Input Sources", then selecting "English (US)" and clicking on the little keyboard icon, doesn't even have Super_L or Hyper_L keys on it; it correctly labels my Windows key as "Level3 Shift".

"xmodmap -pm" says that my Windows key (ISO_Level3_Shift) is actually ampped to mod5, not mod4.

I am able to successfully map my Windows key+L to lock the screen with this command:

gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver '<Mod5>l'

So I now have a workaround from the command line, but this does not change the fact that I am _not_ able to perform this same mapping from within the keyboard control panel... Typing Windows+L after selecting "New Accelerator" for the Lock Screen shortcut changes the shortcut to "Level3 Shift when I hit the windows key, then when I hit the 'l' moves the highlighted item to "Log out" as if it thinks I'm done entering the last shortcut and have tried to move on to a different one by typing 'l' as the first letter of "Log out". The control panel applet doesn't appear to know about Mod5.

Comment 19 Michal Ambroz 2014-12-14 19:50:27 UTC
This seems to work in Fedora 21.
Just mapped the Screensaver lockout to Win-L using the gnome-control-panel.

My Win key seems to be mapped to Super_L (0x85 / 133). 
When running xev and pressing some unmaped combo like Win-e I actually get keypress for "e", keyrelease "e", keyrelease Super_L. I do not get keypress for Super_L (as it is probably captured by gnome-shell).

$ xmodmap -pm
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

Comment 20 Jonathan Kamens 2014-12-14 19:56:41 UTC
It seems like there are two questions here: (1) why is my keycode 133 mapping to ISO_Level3_Shift instead of Super_L? (2) Why can't the shortcuts applet handle mod5 the same way it handles mod4?

Comment 21 Fedora End Of Life 2015-05-29 08:40:09 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 22 Jonathan Kamens 2015-05-29 12:17:54 UTC
Comment 18 and Comment 20 still apply in Fedora 22.

Comment 23 Fedora End Of Life 2016-07-19 20:24:16 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.