Public bug reported:

I'm having difficulties in remapping some of my keys on Ubuntu 20.04 and
gnome-control-center version 3.36.2. The problem is similar to Bug
#1867548 but manifests itself even with gnome-control-center versions
with this bug fixed.

I follow the below steps to exchange the Control_L key and XF86WakeUp key (Fn 
on German keyboards):
I execute xev to discover the Control_L and XF86WakeUp keycodes:

KeyRelease event, serial 37, synthetic NO, window 0x4600001,
    root 0x5dd, subw 0x0, time 4165720, (668,636), root:(902,854),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x4600001,
    root 0x5dd, subw 0x0, time 4166218, (668,636), root:(902,854),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Then, I run
    $ xmodmap -e "keycode 37 = XF86WakeUp"
and
    $ xmodmap -e "keycode 151 = Control_L"

After which xev shows:

KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
    root 0x5fd, subw 0x0, time 1691367, (1390,1888), root:(1584,2066),
    state 0x0, keycode 151 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x3c00001,
    root 0x5fd, subw 0x0, time 1692110, (1390,1888), root:(1584,2066),
    state 0x0, keycode 37 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Saving this to a .Xmodmap file and looking at the content correctly shows the 
change:
$ xmodmap -pke ~./Xmodmap
$ cat ~/.Xmodmap
-- snip --
keycode 37 = XF86WakeUp NoSymbol XF86WakeUp
keycode 151 = Control_L NoSymbol Control_L
-- snip--

However, the system still treats key 37 as Control_L, and key 151 as
XF86WakeUp. Setting 'xmodmap .Xmodmap' to ~/.xinitrc and rebooting also
doesn't work.

** Affects: ubuntu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881527

Title:
  Modifications in xmodmap not taking effect

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1881527/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to