Remapping keys in Linux


I have a keyboard that annoyingly does not have a Pause/Break key.

When I log into work from home I need to use the ICA client (Citrix workspace) which uses Ctrl-Alt-Break key combination to activate its menu. You can see that this is a problem.

I was wondering if there is any way I can either:

  • Configure Citrix Workspace App to use some other hotkey for that
  • Configure at the system,. or Xorg/Wayland or GNOME (which I use) layer something that remaps another combination (e.g. Ctrl-Win-C) to instead generate (or be interpreted as) Ctrl-Alt-Break


1 Like

Have you looked at the Arch wiki?
Edit: I don’t have any experience with this but maybe this helps?

Or this?

1 Like

Thank you @ricklinux. I managed to map it to my caps lock key (rarely ever use that) with:

xmodmap -e "keycode  66 = Pause Break Pause Break Pause Break"

The only problem is that caps-lock now does both actions.

To clarify: when I press Ctrll-Alt-Caps in Citrix Workspace App I get the context menu of Citrix, which is what I want. However, I also seem to get into “Caps lock” state and produces all-caps.

Looking for a way around that now…

Well like i say i don’t have a lot of expertise in this area. :man_shrugging:

Create a .Xmodmap file:

unmap Caps
keycode  66 = Pause Break Pause Break Pause Break

Then xmodmap .Xmodmap to run.


In gnome you can disable caps in tweak tool as well:

1 Like

Hi @xircon

I prefer the Xmodmap approach as it should work without Gnome as well so it seems more generic. However, it seems that unmap does not exist?

[user@host ~]$ cat .Xmodmap 
unmap Caps
keycode  66 = Pause Break Pause Break Pause Break

[user@host ~]$ xmodmap .Xmodmap
xmodmap:  unknown command on line .Xmodmap:1
xmodmap:  1 error encountered, aborting.

This worked:

$ cat .Xmodmap 
remove lock = Caps_Lock
keycode  66 = Pause Break Pause Break Pause Break

Thank you both!

Oops - copy and id10T error - deleted wrong line when I copied and pasted :blush:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.