Fully Disable PrntScr Key
You should be able to disable PrntScr on the console with a custom keymap
. On archlinux the procedure is as follows (it should be similar for other distros):
cd /usr/share/kbd/keymaps/i386/qwerty
- copy your default keymap to a new file:
cp us.map.gz personal.map.gz
- gunzip the new map file:
gunzip personal.map.gz
edit
personal.map
using your favorite editor:
switch to a tty, runshowkey
and press PrntScr to get the key code. On my system it outputs:keycode 99 press keycode 99 release
so PrntScr code is
99
. Addkeycode 99 = nul
to
personal.map
- gzip the map file:
gzip personal.map
then runloadkeys personal
to load the custom keymap then hit PrntScr to test the new keymap. - make it permanent by (creating if not present and) editing
/etc/vconsole.conf
: replaceKEYMAP=us
withKEYMAP=personal
. - reboot
The above works only on console, you will have to disable PrntScr also in X
.
One way to do that is to comment it out in your X
keycodes
file (the one corresponding to your keyboard - linux uses /usr/share/X11/xkb/keycodes/evdev
). Key code is <PRSC>
, just comment it out (add //
in front of it) e.g. replacing
<PRSC> = 107;
with
// <PRSC> = 107;
completely disables PrntScr.