Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Mar 2024 15:15:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 277531] x11/xorg: "Menu" key works on some keyboards not on others
Message-ID:  <bug-277531-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277531

            Bug ID: 277531
           Summary: x11/xorg: "Menu" key works on some keyboards not on
                    others
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: x11@FreeBSD.org
          Reporter: freebsd@tim.thechases.com
             Flags: maintainer-feedback?(x11@FreeBSD.org)
          Assignee: x11@FreeBSD.org

While it took a while to track down[1], the Menu key (usually to the right =
of
the spacebar on the standard 105-key keyboard) seems to send two different
key-codes.

I have USB keyboard plugged into my laptop.  Pressing the Menu key on the
laptop keyboard sends keycode 147 which gets translated to "XF86MenuKB" whi=
le
pressing the same Menu key on the external USB keyboard sends keycode 135 w=
hich
gets translated to the "Menu" keysym:

    $ xev 2>/dev/null | awk '/^Key/{k=3D$1}/keysym/{sub(/, same_screen.*/,
"");print k, $0}'
    KeyPress     state 0x10, keycode 147 (keysym 0x1008ff65, XF86MenuKB)
    KeyRelease     state 0x10, keycode 147 (keysym 0x1008ff65, XF86MenuKB)
    KeyPress     state 0x10, keycode 135 (keysym 0xff67, Menu)
    KeyRelease     state 0x10, keycode 135 (keysym 0xff67, Menu)

Critically, AFAICT, most applications expect/respect the "Menu" keysym, but
ignore the "XF86MenuKB" symbol.  Thus, if I'm in Firefox or Chromium and hit
the Menu key on my laptop, it does nothing; if I hit the Menu key on my
external keyboard, it invokes the right-click menu.  In that Reddit thread[=
1],
it seems to be every application we've thrown at it -- KDE for the OP;
browsers, office applications, and other applications for me.

It looks like some changes were made a couple years ago[2] and someone else
butting their head against the issue[3].

It looks like the solution might involve modifying

    /usr/local/share/X11/xkb/symbols/inet

so that the line currently reading

    key <I147> { [ XF86MenuKB ] };

gets changed, replacing "XF86MenuKB" with "Menu".

(I'm not sure there's a way to update every application that expects "Menu"=
 to
also allow "XF86MenuKB" as a synonym).

I can provide additional detail or debugging output if needed (output of
`xinput --list --long` and `setxkbmap -print` provided at the bottom of thi=
s;
the "SEM" is the external USB keyboard).

---------

[1]
original Reddit thread wherein this was tracked down:
https://www.reddit.com/r/freebsd/comments/1b6gi5n/keyboard_menu_key_doesnt_=
work_on_freebsd14_kde5/

[2]
https://lists.freebsd.org/pipermail/freebsd-current/2020-March/075495.html

[3]
http://www.lemis.com/grog/diary-mar2020.php?subtitle=3DDaily%20teevee%20upd=
ate&article=3DD-20200306-002910#D-20200306-002910


------------

    =E2=8E=A1 Virtual core pointer                      id=3D2    [master p=
ointer  (3)]
        Reporting 8 classes:
                Class originated from: 12. Type: XIButtonClass
                Buttons supported: 12
                Button labels: "Button Left" "Button Middle" "Button Right"
"Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Hor=
iz
Wheel Right" None None None None None
                Button state:
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 0:
                  Label: Rel X
                  Range: 1472.000000 - 5772.000000
                  Resolution: 69000 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 1:
                  Label: Rel Y
                  Range: 1408.000000 - 5086.000000
                  Resolution: 118000 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 2:
                  Label: Rel Horiz Scroll
                  Range: 0.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 3:
                  Label: Rel Vert Scroll
                  Range: 0.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 4:
                  Label: Abs MT Pressure
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 12. Type: XIScrollClass
                Scroll info for Valuator 2
                  type: 2 (horizontal)
                  increment: 113.000000
                  flags: 0x0
                Class originated from: 12. Type: XIScrollClass
                Scroll info for Valuator 3
                  type: 1 (vertical)
                  increment: 113.000000
                  flags: 0x0

    =E2=8E=9C   =E2=86=B3 Virtual core XTEST pointer                    id=
=3D4    [slave  pointer
 (2)]
        Reporting 3 classes:
                Class originated from: 4. Type: XIButtonClass
                Buttons supported: 10
                Button labels: "Button Left" "Button Middle" "Button Right"
"Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Hor=
iz
Wheel Right" None None None
                Button state:
                Class originated from: 4. Type: XIValuatorClass
                Detail for Valuator 0:
                  Label: Rel X
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 4. Type: XIValuatorClass
                Detail for Valuator 1:
                  Label: Rel Y
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative

    =E2=8E=9C   =E2=86=B3 System mouse                                  id=
=3D6    [slave  pointer
 (2)]
        Reporting 7 classes:
                Class originated from: 6. Type: XIButtonClass
                Buttons supported: 12
                Button labels: "Button Left" "Button Middle" "Button Right"
"Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Hor=
iz
Wheel Right" "Button Side" "Button Extra" "Button Forward" "Button Back" No=
ne
                Button state:
                Class originated from: 6. Type: XIValuatorClass
                Detail for Valuator 0:
                  Label: Rel X
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 6. Type: XIValuatorClass
                Detail for Valuator 1:
                  Label: Rel Y
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 6. Type: XIValuatorClass
                Detail for Valuator 2:
                  Label: Rel Horiz Scroll
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 6. Type: XIValuatorClass
                Detail for Valuator 3:
                  Label: Rel Vert Scroll
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 6. Type: XIScrollClass
                Scroll info for Valuator 2
                  type: 2 (horizontal)
                  increment: 120.000000
                  flags: 0x0
                Class originated from: 6. Type: XIScrollClass
                Scroll info for Valuator 3
                  type: 1 (vertical)
                  increment: 120.000000
                  flags: 0x0

    =E2=8E=9C   =E2=86=B3 SynPS/2 Synaptics TouchPad                    id=
=3D12   [slave  pointer
 (2)]
        Reporting 8 classes:
                Class originated from: 12. Type: XIButtonClass
                Buttons supported: 12
                Button labels: "Button Left" "Button Middle" "Button Right"
"Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Hor=
iz
Wheel Right" None None None None None
                Button state:
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 0:
                  Label: Rel X
                  Range: 1472.000000 - 5772.000000
                  Resolution: 69000 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 1:
                  Label: Rel Y
                  Range: 1408.000000 - 5086.000000
                  Resolution: 118000 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 2:
                  Label: Rel Horiz Scroll
                  Range: 0.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 3:
                  Label: Rel Vert Scroll
                  Range: 0.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 12. Type: XIValuatorClass
                Detail for Valuator 4:
                  Label: Abs MT Pressure
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 12. Type: XIScrollClass
                Scroll info for Valuator 2
                  type: 2 (horizontal)
                  increment: 113.000000
                  flags: 0x0
                Class originated from: 12. Type: XIScrollClass
                Scroll info for Valuator 3
                  type: 1 (vertical)
                  increment: 113.000000
                  flags: 0x0

    =E2=8E=A3 Virtual core keyboard                     id=3D3    [master k=
eyboard (2)]
        Reporting 1 classes:
                Class originated from: 13. Type: XIKeyClass
                Keycodes supported: 248

        =E2=86=B3 Virtual core XTEST keyboard                   id=3D5    [=
slave=20
keyboard (3)]
        Reporting 1 classes:
                Class originated from: 5. Type: XIKeyClass
                Keycodes supported: 248

        =E2=86=B3 System keyboard multiplexer                   id=3D7    [=
slave=20
keyboard (3)]
        Reporting 1 classes:
                Class originated from: 7. Type: XIKeyClass
                Keycodes supported: 248

        =E2=86=B3 ACPI video extension                          id=3D8    [=
slave=20
keyboard (3)]
        Reporting 1 classes:
                Class originated from: 8. Type: XIKeyClass
                Keycodes supported: 248

        =E2=86=B3 Power Button                                  id=3D9    [=
slave=20
keyboard (3)]
        Reporting 1 classes:
                Class originated from: 9. Type: XIKeyClass
                Keycodes supported: 248

        =E2=86=B3 Sleep Button                                  id=3D10   [=
slave=20
keyboard (3)]
        Reporting 1 classes:
                Class originated from: 10. Type: XIKeyClass
                Keycodes supported: 248

        =E2=86=B3 AT keyboard                                   id=3D11   [=
slave=20
keyboard (3)]
        Reporting 1 classes:
                Class originated from: 11. Type: XIKeyClass
                Keycodes supported: 248

        =E2=86=B3 SEM USB Keyboard                              id=3D13   [=
slave=20
keyboard (3)]
        Reporting 1 classes:
                Class originated from: 13. Type: XIKeyClass
                Keycodes supported: 248



--------------

    xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include
"pc+us+inet(evdev)+compose(caps)+shift(both_capslock)"  };
        xkb_geometry  { include "pc(pc105)"     };
    };

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277531-7788>