Today my Guake Terminal started acting up in a way I haven't seen before - every time I press AltGr (which on my Swedish keyboard is the right Alt, right next to Spacebar on the right-hand side) the terminal looses focus and hides. On my Swedish keyboard this is extremely inconvenient, since AltGr is used to type pipes (|
)...
I did install some updates which required a restart of my system today, but IIRC that was only Ubuntu Base and nothing else. I don't know for certain if this behavior was present before the update - since the popup came up when I started my system, I didn't do much work before I installed them and rebooted.
I also took a look in the Guake preferences to see if there was anything fishy with the keyboard shortcuts, but AltGr isn't used at all, and all other shortcuts work as expected. AltGr works normally in other context, such as an actual Terminal window (opened e.g. by pressing Ctrl+Alt+T) or typing here in Chromium.
What could have caused this? How do i troubleshoot and/or fix it?
I've found a workaround that actually solves the problem for me, if only temporarily1: restart the window manager. Using Unity, this can be done by running
in a terminal.
But be careful!
Compiz spits out an aweful lot of gore in the terminal - the first time I did this I forgot the
&
and my initial reaction to the gore was Ctrl+C - killing my window manager.It is (supposedly, I never tried it myself) possible to recover, using tricks like Ctrl+Shift+<number> to get to a TTY terminal, and run
but tread carefully anyway. Save all your stuff before trying this, in case you do something stoopid and need to reboot.
Credits:
I probably wouldn't have figured this out without looking in the bug report which falconer brought to my attention.
1) I haven't had this problem since, though. Touch wood 'n' stuff.
Try going into guake preferences and under the General tab make sure that Stay on top is checked and Hide on lose focus is unchecked. (Although these settings doesn't explain why it is hiding on AltGr they may help.)
UPDATE: I made up a series of commands to show us the passive grabs on a keystroke. (Unfortunately I couldn't find an easier way to show passive grabs as XF86LogGrabInfo only shows active grabs.) So please run this command and post its output so we can find out if something is grabbing that AltGr key:
or just
(The above code will trigger the AltGr keypress event, so your guake terminal will hide/unhide during the execution, so better to run this command from e.g.
gnome-terminal
. If guake doesn't hide/unhide then something is wrong with your layout as your AltGr is not mapped to ISO_Level3_Shift)Update as it looks like this maybe a layout problem.
First I would just try switching to a different layout and test if AltGr is functioning well in an other layout (Dash->Keyboard Layout and press on the
+
sign to bring up other layouts.) You may try out a different swedish layout or a layout of another North/Eastern European language (At least I know that these are using AltGr, but of course don't switch to a cyrillic, like Russian or Serb.) Though it is unlikely that the problem is with some of the official layouts, more likely it is a problem with some fine-tuning of an official layout. So if you modified your layout in some way remove those modifications and check again.Next you can test with
xev
the keysym what your AltGr is reporting. Launchxev
, click in its window, press AltGr, see the output. But if it causes a Focus-Out event then it likely won't catch it. In this case try withxev -root
to monitor the root window, maybe you altgr is going there. (This latter won't draw a window, so just press AltGr and see if there is some useful output.)You can also dump your keyboard layout with
xkbcomp $DISPLAY output.xkb
then examine the output.xkb file with a text editor, it should contain this(At least for me it does contain that and my AltGr is working correctly.)
You can also check if your keyboard has some modifier key which is turned on and maybe changes the behaviour of the AltGr.
Update 3, I think this is the most likely situation in your case
Please also check if you are maybe hit by this bug: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/971462
Though I never had that kind of problem with the HUD, some people looks like have it.
There is a workaround in that bugreport's conversation:
But of course it is better if you change it to your left Alt-key, don't know why he proposes the right. For me at that option I indeed have
Alt L
by default.You may also try to disable that shortcut totally.
I had the same issue. Workaround:
Works for me.
I observe the same problem since recently (Ubuntu 13.10). I have also a Swedish keyboard, but the issue remains even if I change the keyboard layout. I tested the command:
xkbcomp $DISPLAY output.xkb
but everything seems correct.