Цей вебсайт матиме обмежену функціональність, доки ми проводимо його обслуговування для поліпшення роботи. Якщо прочитана стаття не розв'язала вашу проблему і ви хочете поставити питання, наша спільнота підтримки з радістю допоможе вам на @FirefoxSupport у Twitter та /r/firefox на Reddit.

Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

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