Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

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

  • 1 ответ
  • 3 имеют эту проблему
  • 1 просмотр
  • Последний ответ от 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>

Изменено cor-el

Выбранное решение

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".

Прочитайте этот ответ в контексте 👍 1

Все ответы (1)

more options

Выбранное решение

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".