Hi all,
I run CentOS5.1 with all updates, and like to use metacity's keybindings (gconf-editor->/apps/metacity/global_keybindings and keybinding_commands) to set shortcut keys for xterm, nautilus, and the like, so <Mod4>x runs xterm and <Mod4>e runs nautilus, rather how Windows-XP keyboard shortcuts work. I always log on as 'neek', the only user other than 'root' that I use for user shells on this laptop. I've used a default Gnome desktop since fresh install about 4 months ago.
I find that sometimes when I boot, the keybindings take effect, and sometimes when I boot, they do not. I reckon one of two things might be happening:
- on some boots, the gconf configuration that I have set up fails to be loaded - on some boots, my windows key mapping somehow gets screwed, so that pressing it does not send a Mod4 keystroke to whatever recognises them
I don't think the former is happening, because I can run gconf-editor as 'neek' and see my keybinding configuration even when the keybindings are not working, such as this morning.
I suspect the latter, because I can press Mod4-x and get an 'x' character in places where I'd expect it to not give me an 'x', for example in an xterm pressing the key combination just sends an 'x' to the console, whereas alt-x does not. When the windows key is working as expected, I don't see an 'x' echo'd to the console.
How can I investigate why my Windows key is not triggering the expected keybinding commands?
TIA Nick
On Thu, May 8, 2008 at 11:13 PM, Nick Fenwick neek@tcp.co.uk wrote:
Hi all,
How can I investigate why my Windows key is not triggering the expected keybinding commands?
This may seem dumb, but are you sure it's not your keyboard? I use a Logitech EX110 wireless keyboard and mouse, and every once in a while the number keypad goes silent, and then it comes back for no particular reason. Could your Mod key be misbehaving?
Also, there are three key bindings files in gnome (none of which I recall by name at the moment) but you need to make sure they all are set correctly (there's one for each section of the keystroke preferences window - desktop, multimedia and windows). I had some problems similar to this when the right settings wound up in the wrong file, but nothing as sporadic as what you're describing.
HTH.
mhr
MHR wrote:
On Thu, May 8, 2008 at 11:13 PM, Nick Fenwick neek@tcp.co.uk wrote:
Hi all,
How can I investigate why my Windows key is not triggering the expected keybinding commands?
This may seem dumb, but are you sure it's not your keyboard? I use a Logitech EX110 wireless keyboard and mouse, and every once in a while the number keypad goes silent, and then it comes back for no particular reason. Could your Mod key be misbehaving?
Thanks for the pointers. This is a new keyboard, installed because I spilled some oil on the last one (it's amazing how frustrating programming without a working 9 key is). The mod key never starts/stops working during a session .. it's always rebooting that changes it to/from working state.
Also, there are three key bindings files in gnome (none of which I recall by name at the moment) but you need to make sure they all are set correctly (there's one for each section of the keystroke preferences window - desktop, multimedia and windows). I had some problems similar to this when the right settings wound up in the wrong file, but nothing as sporadic as what you're describing.
I've had a look at what gnome-keybinding-properties gives me, and see it controls stuff like the workspace switching keys. My alt-1, alt-2 etc. bindings always work, regardless of the dodgy mod key. It's only the mod key, among all the keybindings that I use in heavy programming sessions i.e. using lots of keybindings in lots of apps, that is intermittent as I described.
Having said that, the only utility to which I put my windows key is the metacity keybindings as I described. I'm in a session now where my mod4 key is not working. I just tried setting the 'switch to workspace 1' gnome-keybinding-properties key to mod4-1 instead of alt-1. This app has the benefit over the gconf-editor in that it reads keypresses that you type and enters the keycodes for you. As soon as I press the windows key, it enters "Super_L" and refuses to accept the '1'. Trying to assign mod4-2 to workspace 2 results in it accepting Super_L and complaining that that is already assigned. I haven't come across Super_L before.
Some googling led me to http://www.fedoraforum.org/forum/archive/index.php/t-46657.html , which indicates I should change my "Alt/Win key behaviour" from "Default" (whatever that is) to something else. Trying "Meta is mapped to the Win-keys" causes g-k-p to come up with <Mod4><Hyper>x, and suddenly the old <Mod4>x binding in gconf's metacity section is working, running xterm as requested.
So I guess my problem was the System->Preferences->Keyboard=>Layout Options->Alt/Win key behaviour setting being Default. I'll play around more on other reboots and see if the Super_L behaviour changes for any reason.
Cheers :) Nick