3

My goal is to remap a key called sysrq on my keyboard to be Super_R.

I know I need to first find the keycode that corresponds to the physical key that is being pressed and then remap it using xmodmap -e "keycode nnn = Super_R" where nnn is the keycode found whilst running xev and pressing the physical key.

However the issue I have is that whilst running xev | grep keycode and pressing the sysrq key on my keyboard I get two keycodes being emitted.

$ xev | grep keycode

state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
state 0x8, keycode 107 (keysym 0xff15, Sys_Req), same_screen YES,
state 0x8, keycode 107 (keysym 0xff15, Sys_Req), same_screen YES,
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,

The Sys_Req key code makes sense - one for key press down and the other for key press up. But it has the Alt_L keycode peppered in there at the same time. How do I stop that with a view to eventually remapping the sysrq physical key to emit the Super_R keycode?

$ showkey --keycodes

keycode  56 press
keycode  56 release
keycode  56 press
keycode  99 press
keycode  99 release
keycode  56 release
kernel: 5.13.0-27-generic #29~20.04.1-Ubuntu
os: Ubuntu 20.04.3 LTS
gnome: 3.36.8
window system: X11
laptop: starlabs starbook mk v
3
  • Which supported release of Ubuntu are you using? X Windows or Wayland? What's the model of the keyboard? Have you checked the manufacturer's (of the keyboard) web site? Read askubuntu.com/help/how-to-ask and askubuntu.com/help/formatting
    – waltinator
    Jan 22, 2022 at 22:33
  • Updated question with some more information. I've contacted the manufacturer and they don't know how to help here.
    – mez.pahlan
    Jan 22, 2022 at 23:36
  • Thanks @Quasímodo I've updated with the output. For a single press of my sysrq key I get multiple codes press and release. What does that mean? I'm out of luck?
    – mez.pahlan
    Jan 23, 2022 at 17:02

0

You must log in to answer this question.

Browse other questions tagged .