On the Lenovo Thinkpad E560 the Menu Key that usually has its place between the right alt key and the right Ctrl has been replaced by the Prt. Scr. screenshot button, pretty much breaking my workflow in quite a few situations.

I’m using the following small shell snippet to get the Menu functionality assigned back to the original key and letting the “Open folder key” do the screenshots instead:

#!/bin/sh

# Get back old menu key:
xmodmap -e "keycode 107 = Menu"
# Assign screenshot functionality to some other key: 
xmodmap -e "keycode 165 = Print"

Instead of manually sourcing that script afer login, I added the following lines to my .zshrc and .bashrc:

if [[ $(hostname) == *"ThinkPad-E560"* ]]; then
	xmodmap -e "keycode 107 = Menu" 
	xmodmap -e "keycode 165 = Print"
fi