Firefox doesn't recognize my "ALT" keys anymore

4

Ubuntu 12.04, Firefox 13.0, xfce

For some reason, my Firefox installation has stopped paying attention to ALT keystroke combinations. That is, when I try an ALT-something key combination, I get the "something" as if ALT wasn't pressed at all. The "ALT" mechanism works fine in all the other apps I've tried; it used to work in Firefox (like, literally for years and years, until just the other day).

I've tried running on a new Firefox profile, and it behaves the same way, so I don't think it's a corrupted profile. I've got another laptop, different hardware, but essentially the same setup as this one, and Firefox and the "ALT" key get along fine there.

I have no idea where to even start trying to diagnose this. The general issue of keystroke processing on Linux is, I know, a fantastically complicated area, but since my "ALT" key seems to work perfectly well in every other application on the computer, I'm thinking this has something to do with some weird Firefox configuration thing.

What might be the problem? What can I do to investigate what's going wrong?

edit — Uninstalled/reinstalled Firefox, no effect. Still can't find another application on the system that doesn't understand the ALT key.

Pointy

Posted 2012-06-15T01:01:42.113

Reputation: 763

If you guys think this should be in "Ask Ubuntu", that's fine by me. – Pointy – 2012-06-15T01:02:03.517

I know on Windows, keys get messed up when you work with virtual machines. (Not sure if that has to do anything with your problem, but thought I'd mention it just in case...) – user541686 – 2012-06-15T01:07:11.797

Thanks - I don't think that's what's happening to me here, but I bet you're right about it being a possibility. My host OS is Ubuntu on this machine, and it's the native Firefox. It worked fine up until a few days ago; I must have changed something unwittingly but I have no clue what it was. – Pointy – 2012-06-15T01:12:27.217

Answers

2

You may need to reinitialize your keyboard mapping


  • from an xterm run setxkbmap followed by xmodmap

Other things to check

  • Remove lvl3:ralt_switch if present in /etc/default/console-setup

analyze the output from this procedure:

  • from xterm: xev | grep -B 4 -C 4 KeyPress
  • move mouse into the terminal window
  • make a keypress using LEFT-ALT
  • next make a keypress using RIGHT-ALT

Jeremy W

Posted 2012-06-15T01:01:42.113

Reputation: 3 529

I'll do those things, but it should be noted that my ALT keys work perfectly well in every other application I run on this system. It's only Firefox that has the problem. – Pointy – 2012-06-15T03:43:08.107

OK now that was a bad idea. The setxkbmap program totally blew away all my keyhboard mappings (that I've been using literally since the early 1990's with no issues at all). – Pointy – 2012-06-15T03:44:50.770

well if it's something outside FF, how is it that FF is the only thing affected? Chrome, for example, obeys the ALT key. So does xterm. So does every other application I've tried, which is basically everything on the system with a GUI. – Pointy – 2012-06-15T03:46:01.970

The xev program shows that my ALT keys are working perfectly well. – Pointy – 2012-06-15T03:47:03.500

Yes, the ALT key works in every single thing on the system except Firefox. This is undoubtedly a Firefox issue. – Pointy – 2012-06-15T03:47:29.037

To remove what? – Pointy – 2012-06-15T03:48:25.370

I'm using Synaptic to "completely remove" the application. Note that all newly-created Firefox profiles behave exactly the same way. Note also that up until a couple days ago it all worked just fine. – Pointy – 2012-06-15T03:49:11.313

Well I'll be hog-tied - it just started working again. I have no idea what did it; maybe (!?!??!?) that invocation of setxkbmap followed by my calling xmodmap again fixed things, but whatever. – Pointy – 2012-06-15T03:59:20.253

1

I have exactly same problem (my case is archlinux) and I found a fix that works for me: Add/change a line:

Option "XkbVariant" "intl"

to your /etc/X11/xorg.conf.d/10-evdev.conf

Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "XkbModel" "asus_laptop"
    Option "XkbVariant" "intl"
    Option "XkbLayout" "us"
EndSection

Lan Nguyen

Posted 2012-06-15T01:01:42.113

Reputation: 111