We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

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

  • 1 trả lời
  • 3 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi 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>

Được chỉnh sửa bởi cor-el vào

Giải pháp được chọn

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

Đọc câu trả lời này trong ngữ cảnh 👍 1

Tất cả các câu trả lời (1)

more options

Giải pháp được chọn

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