Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
% uname -a
Linux phoebe 3.2.0-33-generic #52-Ubuntu SMP Thu Oct 18 16:29:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I'm running 12.04 on the machine I'm typing this on, and I've been running it for quite some time. I just did a dist-upgrade, and it included some update for Firefox (to 17.0.1 now). After restarting the browser, I noted with some surprise that I can't type back-quotes or tildes. They worked just a few minutes ago before the update, but not now.

I use a Deck keyboad, and I have the back-quote/tilde key remapped. I've had the keyboard for many years now and the remapping has always worked:

% xmodmap -pk | egrep tilde
133         0x0060 (grave)  0x007e (asciitilde)     0x0060 (grave)  0x007e (asciitilde)

I can type those characters into xterm windows, into Chrome, gvim, gedit, etc. What in the world is going on with Firefox? I can't find any relevant configuration options, and I certainly haven't been tinkering with them. I've tried restarting it a couple times too.

I'll try running a new clean profile and see if that makes a difference; I do have some add-ons but nothing new and nothing particularly crazy. edit Nope, can't type the characters in a plain-jane profile either.

edit — reinstalled Firefox, same thing.

edit again — I've also found that VirtualBox seems to ignore the xmodmap remapping. I've basically got the grave/tilde key swapped with another key that's remapped to "Alt". In VirtualBox now (I don't think it was always this way, but I'm not 100% sure), I can type back-quote or tilde with the key that's swapped to "Alt". However, that does not work in Firefox — neither key works as the grave/tilde key, though I've just verified that the remapped "Alt" key in Firefox does work (as "Alt")!!

edit yet again — upgraded to 12.10, same problem. Something changed somewhere, as I am 100% positive that that key was working today and over the past many months. (Why? How do you quote code snippets inline in Markdown? I'm on Stackoverflow a lot and that's how I noticed it was broken.)

share|improve this question
    
You may have something wrong with the update as if you just made a dist-update, uname is not reflecting it. Should be 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux. (Not that I think this can be the issue with the keyboard). Is your keyboard configured as US? No dead-keys? How are the other accent keys working? ', ^? –  laurent Dec 23 '12 at 18:49
    
@laurent yes I picked up the new kernel but I haven't rebooted yet :-) The keyboard is a US keyboard, and right this very minute I can open an xterm and type all the tilde characters I want. I can't type them here through Firefox however :( –  Pointy Dec 23 '12 at 18:50
    
Maybe you should only reboot then :) –  laurent Dec 23 '12 at 18:52
    
@laurent yes I'm about to try that but I have very low expectations that it'll make a difference. I mean, the keyboard works fine on every other application in the system. –  Pointy Dec 23 '12 at 18:53
    
Yes but you upgraded a kernel and your machine isn't using it and firefox was upgraded after that possibly loading the parts it needs from the new libs. those thing can be very complex! :) –  laurent Dec 23 '12 at 18:58

1 Answer 1

up vote 0 down vote accepted

My old (and I mean old) xmodmap remapping file included these two key lines:

keycode 49 = Alt_L
keycode 133 = grave asciitilde

Those two lines accomplished the remapping only partially. What I had failed to do was this:

add mod1 = Alt_L
remove mod4 = Super_L

The key that I wanted to be the accent/tilde key had been a modifier key, for "mod4", with the keysym "Super_L". For some reason, that didn't start causing a problem until yesterday. Here I am in Firefox typing back-quotes just like before!!

So the bottom line is this: if you remap key symbols, make sure to check the modifier map. You can check the initial state of keys by starting a fresh X session and then typing:

xmodmap -pk

Then, view the initial modifier map with:

xmodmap

If you change keysyms for keycodes, make sure you add/remove them from the modifier map as necessary.

edit — oh also you can use xev to figure out what the keycode/keysym for a particular key is. Just run it from a terminal window; it's kind-of a mess but just mouse over its little window and press the key a couple times. Use ^C (control-C) in the terminal window to stop it, or I guess the "Close" thingy on the window.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.