Key-Mon is a utility that allows Ubuntu users to monitor keyboard and mouse status on your screen in realtime. Once launched, Key-Mon will stick to the bottom of your screen and will display in real-time your key presses and mouse clicks.
You can also move the utility bar to any other area on your screen. This utility can be useful in teaching and screencasts.
To install Key-Mon on Ubuntu 14.10/14.04 or older, issue this command:
sudo apt-get install keymon
You can then start Key-Mon via the Unity dash: