This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Cuireadh an snáithe seo sa chartlann. Cuir ceist nua má tá cabhair uait.

Ubuntu: Changing keyboard layout with xmodmap causes right square bracket key to stop working

  • 1 freagra
  • 3 leis an bhfadhb seo
  • 1 view
  • Freagra is déanaí ó r1cket

more options

I use an Apple keyboard, so I have to use a custom xmodmap file to switch my alt and super keys. When I apply this file using xmodmap, the right square bracket key stops responding in Firefox, but works fine in every other program. This means I can't type a right square bracket or right curly brace anywhere in Firefox; in the address bar, search box, settings, websites, etc. It's as if I'm not even pressing the key.

I can "fix" the key by resetting the xmodmap, with the command: setxkbmap -layout us (but then of course, the super and alt keys are switched, so I can't actually use the computer like that)

I apply my xmodmap file with the command: xmodmap ~/.Xmodmap My ~/.Xmodmap file is pasted below - you can see I'm not remapping the right square bracket key (which is keycode 35, keysym 0x5d, "bracketright" according to xev). The troubleshooting information was taken while my xmodmap layout is in effect.

Please keep in mind: this is only an issue for Firefox. The right square bracket key works in every other program. So I suspect this is a Firefox bug.

==== Start of .Xmodmap file ====

! Swap Alt and Cmd keys.
keycode 37 =    Control_L
keycode 133 =   Alt_L Meta_L
keycode 64 =    Super_L

keycode 134 =   Alt_R Meta_R
keycode 108 =   Super_R
keycode 105 =   Control_R

clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add    Shift   = Shift_L Shift_R
add    Lock    = Caps_Lock
add    Control = Control_L Control_R
add    Mod1    = Alt_L 0x007D
!because the "0x007D" will assign the "+*]" key to the unity menu
add    Mod2    = Num_Lock
add    Mod4    = Super_L Super_R
add    Mod5    = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift

! Configure '=' key on numpad as '='.
keycode 0x7D =  equal

! Configure shift-space as space instead of nbsp
keycode 65 =space space
I use an Apple keyboard, so I have to use a custom xmodmap file to switch my alt and super keys. When I apply this file using xmodmap, the right square bracket key stops responding in Firefox, but works fine in every other program. This means I can't type a right square bracket or right curly brace anywhere in Firefox; in the address bar, search box, settings, websites, etc. It's as if I'm not even pressing the key. I can "fix" the key by resetting the xmodmap, with the command: setxkbmap -layout us (but then of course, the super and alt keys are switched, so I can't actually use the computer like that) I apply my xmodmap file with the command: xmodmap ~/.Xmodmap My ~/.Xmodmap file is pasted below - you can see I'm not remapping the right square bracket key (which is keycode 35, keysym 0x5d, "bracketright" according to xev). The troubleshooting information was taken while my xmodmap layout is in effect. Please keep in mind: this is only an issue for Firefox. The right square bracket key works in every other program. So I suspect this is a Firefox bug. <pre><nowiki>==== Start of .Xmodmap file ==== ! Swap Alt and Cmd keys. keycode 37 = Control_L keycode 133 = Alt_L Meta_L keycode 64 = Super_L keycode 134 = Alt_R Meta_R keycode 108 = Super_R keycode 105 = Control_R clear Shift clear Lock clear Control clear Mod1 clear Mod2 clear Mod3 clear Mod4 clear Mod5 add Shift = Shift_L Shift_R add Lock = Caps_Lock add Control = Control_L Control_R add Mod1 = Alt_L 0x007D !because the "0x007D" will assign the "+*]" key to the unity menu add Mod2 = Num_Lock add Mod4 = Super_L Super_R add Mod5 = Mode_switch ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift ! Configure '=' key on numpad as '='. keycode 0x7D = equal ! Configure shift-space as space instead of nbsp keycode 65 =space space</nowiki></pre>

Athraithe ag cor-el ar

Réiteach roghnaithe

Apparently I should have researched a bit better. This appeared to be unrelated, but actually the specific post I'm linking fixed the problem for me:

http://ubuntuforums.org/showpost.php?p=11900141&postcount=6

I.e. I had to remove "0x007D" from the line starting with "add Mod1".

Read this answer in context 👍 1

All Replies (1)

more options

Réiteach Roghnaithe

Apparently I should have researched a bit better. This appeared to be unrelated, but actually the specific post I'm linking fixed the problem for me:

http://ubuntuforums.org/showpost.php?p=11900141&postcount=6

I.e. I had to remove "0x007D" from the line starting with "add Mod1".