1

I am trying to map my caps-lock key to the print-screen key. Looking up in the /usr/share/X11/xkb/rules directory, and searching for print, prnt etc., I found out that the key is called one of

  • prsc
  • PrtSc

Now, following the steps mentioned in this reply, I did:

➜ setxkbmap -option caps:prsc

➜ sudo setxkbmap -option caps:prsc
No protocol specified
Cannot open display ":0"

➜ setxkbmap -option caps:PrtSc

However, none of these worked. However, doing the same for caps:escape (as mentioned in the linked post above) works.

Is there some other mapping/binding that is needed before PrtSc key can be bound as well?

I am on Archlinux, using x11 (i3).

hjpotter92
  • 722
  • 2
  • 13
  • 27

1 Answers1

0

You can do this with xmodmap:

xmodmap -e "remove Lock = Caps_Lock" -e "keysym Caps_Lock = Print"

See xmodmap -pke to get the names of available functions like Caps_Lock, Print, or XF86AudioMute.

Matthias Braun
  • 1,162
  • 1
  • 17
  • 29